diff --git a/src/secrets.js b/src/secrets.js index 875249b4..45b26e0a 100644 --- a/src/secrets.js +++ b/src/secrets.js @@ -40,7 +40,7 @@ async function getSecrets(secretRequests, client) { responseCache.set(requestPath, body); } catch (error) { const {response} = error; - if (response.statusCode === 404) { + if (response?.statusCode === 404) { throw Error(`Unable to retrieve result for "${path}" because it was not found: ${response.body.trim()}`) } throw error