handle undefined response in getSecrets error handler (#431)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user