mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-07-26 00:13:16 +03:00
handle undefined response in getSecrets error handler (#431)
This commit is contained in:
+1
-1
@@ -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