Skip to content

Commit

Permalink
core: attach err.cause (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber authored May 31, 2023
1 parent b42ec87 commit 2570e57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ async function start (ctx) {
let event
try {
event = JSON.parse(line)
} catch {
} catch (_err) {
const err = new Error(`Failed to parse core event: ${line}`)
err.cause = _err
Sentry.captureException(err)
console.error(err)
return
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"skipLibCheck": true,
"allowJs": true,
"checkJs": true,
"lib": ["es2021"],
"lib": ["es2022"],
"target": "es2021",
"module": "commonjs",
"moduleResolution": "node",
Expand Down

0 comments on commit 2570e57

Please sign in to comment.