Skip to content

Commit a88307a

Browse files
committed
Fix executing .text() twice on the same resource
Ref #28
1 parent 1f6738a commit a88307a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

options.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ async function querySecrets(vaultServerAdress, vaultToken, policies) {
5858
}
5959
);
6060
if (!fetchListOfSecretDirs.ok) {
61+
const returnText = await fetchListOfSecretDirs.text();
6162
notify.error(
62-
`Fetching list of secret directories failed: ${await fetchListOfSecretDirs.text()}`
63+
`Fetching list of secret directories failed: ${returnText}`
6364
);
6465
throw new Error(
65-
`Fetching list of secret directories failed: ${await fetchListOfSecretDirs.text()}`
66+
`Fetching list of secret directories failed: ${returnText}`
6667
);
6768
}
6869
await displaySecrets((await fetchListOfSecretDirs.json()).data.keys);

0 commit comments

Comments
 (0)