Skip to content

Commit

Permalink
Fix executing .text() twice on the same resource
Browse files Browse the repository at this point in the history
Ref #28
  • Loading branch information
mulbc committed May 25, 2022
1 parent 1f6738a commit a88307a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ async function querySecrets(vaultServerAdress, vaultToken, policies) {
}
);
if (!fetchListOfSecretDirs.ok) {
const returnText = await fetchListOfSecretDirs.text();
notify.error(
`Fetching list of secret directories failed: ${await fetchListOfSecretDirs.text()}`
`Fetching list of secret directories failed: ${returnText}`
);
throw new Error(
`Fetching list of secret directories failed: ${await fetchListOfSecretDirs.text()}`
`Fetching list of secret directories failed: ${returnText}`
);
}
await displaySecrets((await fetchListOfSecretDirs.json()).data.keys);
Expand Down

0 comments on commit a88307a

Please sign in to comment.