Skip to content

Commit f6ce773

Browse files
committed
fix: if cannot parse err, just print
1 parent 2c5b6e4 commit f6ce773

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ async function run() {
339339
/* istanbul ignore next */
340340
if (require.main === module) {
341341
run().catch((err) => {
342-
core.debug(`Received error: ${JSON.stringify(err)}`);
343342
const httpStatusCode = err.$metadata ? err.$metadata.httpStatusCode : undefined;
344343
core.setFailed(`${err.name} (Status code: ${httpStatusCode}): ${err.message}`);
344+
core.debug(`Received error: ${JSON.stringify(err)}`).catch(() => { return err });
345345
core.debug(err.stack);
346346
process.exit(1);
347347
});

0 commit comments

Comments
 (0)