Skip to content

Commit

Permalink
include error message
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Jul 11, 2024
1 parent 50d12d4 commit 24e9cf7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,14 @@ async function init() {
});
} else {
console.error("Unexpected Error", err);
Sentry.captureException(err,{
level: "fatal"
});
res.status(500).json({
success: false,
error: "An unexpected error occurred",
errorType: err.name,
details: err.message,
breadcrumb: isBreadRequest(req) ? req.breadcrumb : null
})
}
Expand Down

0 comments on commit 24e9cf7

Please sign in to comment.