Handle random non-error errors
This commit is contained in:
parent
62101e7739
commit
b8b01a817a
1 changed files with 4 additions and 2 deletions
6
app.js
6
app.js
|
@ -33,8 +33,10 @@ if (process.env.NODE_ENV === 'production') {
|
|||
app.proxy = true;
|
||||
}
|
||||
|
||||
app.on('error', (err, ctx) => {
|
||||
Sentry.captureException(err);
|
||||
app.on('error', (err) => {
|
||||
if (!err.status || err.status >= 500) {
|
||||
Sentry.captureException(err);
|
||||
}
|
||||
});
|
||||
|
||||
app.use(errorHandler(Sentry));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue