Skip to content

Commit

Permalink
fix: Improve error logging to include stack trace in index.ts and ind…
Browse files Browse the repository at this point in the history
…ex.js
  • Loading branch information
austenstone committed Nov 26, 2024
1 parent c4d3688 commit 5e5efd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29153,15 +29153,15 @@ try {
});
}
catch (e) {
(0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.error)(JSON.stringify(e, null, 2));
if (e instanceof Error) {
(0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.error)(JSON.stringify(e.stack, null, 2));
(0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.error)(e.message, {
title: e.name,
});
}
throw e;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZmlsZTovLy9DOi9Vc2Vycy9hdXN0ZS9zb3VyY2UvYWN0aW9uLXR5cGVzY3JpcHQvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDN0QsT0FBTyxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV0RCxNQUFNLEtBQUssR0FBRztJQUNaLEtBQUssRUFBRSxRQUFRLENBQUMsY0FBYyxDQUFDO0NBQ2hDLENBQUM7QUFFRixJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDckMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxJQUFJLEVBQUUsQ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7UUFDL0IsTUFBTSxFQUFFLElBQUksRUFBRSxNQUFNLEVBQUUsR0FBRyxNQUFNLE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7UUFFdEUsS0FBSyxNQUFNLEtBQUssSUFBSSxNQUFNLEVBQUUsQ0FBQztZQUMzQixJQUFJLENBQUMsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLEtBQUssQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDO1FBQzNDLENBQUM7SUFDSCxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFBQyxPQUFPLENBQUMsRUFBRSxDQUFDO0lBQ1gsSUFBSSxDQUFDLFlBQVksS0FBSyxFQUFFLENBQUM7UUFDdkIsS0FBSyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUN4QyxLQUFLLENBQUMsQ0FBQyxDQUFDLE9BQU8sRUFBRTtZQUNmLEtBQUssRUFBRSxDQUFDLENBQUMsSUFBSTtTQUNkLENBQUMsQ0FBQztJQUNMLENBQUM7SUFDRCxNQUFNLENBQUMsQ0FBQztBQUNWLENBQUMifQ==
__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } }, 1);

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ try {
}
});
} catch (e) {
error(JSON.stringify(e, null, 2));
if (e instanceof Error) {
error(JSON.stringify(e.stack, null, 2));
error(e.message, {
title: e.name,
});
Expand Down

0 comments on commit 5e5efd4

Please sign in to comment.