Skip to content

Commit

Permalink
Surface inner exception when secret:bulk upload command fails
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiRishi committed Jan 3, 2024
1 parent 2521ec0 commit 7e684fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
endGroup as originalEndGroup,
error as originalError,
info as originalInfo,
debug,
startGroup as originalStartGroup,
setFailed,
setOutput,
Expand Down Expand Up @@ -204,7 +205,11 @@ async function uploadSecrets() {
),
),
});
} catch (err) {
} catch (err: unknown) {
if (err instanceof Error) {
error(err.message);
debug(`Secret upload error stack: ${err.stack}`);
}
throw new Error(`Failed to upload secrets.`);
} finally {
endGroup();
Expand Down

0 comments on commit 7e684fb

Please sign in to comment.