Closed Situphen closed 2 years ago
Quoting Sentry's documentation:
The error handler must be before any other error middleware and after all controllers
I tried it on Zeste de Savoir's staging server using this custom route to generate an error:
app.get("/debug-sentry", function mainHandler(req, res) { throw new Error("My first Sentry error!"); });
Currently, the error is logged in .pm2/logs/ but not sent to Sentry. With these changes, it is logged and sent to Sentry.
.pm2/logs/
Quoting Sentry's documentation:
I tried it on Zeste de Savoir's staging server using this custom route to generate an error:
Currently, the error is logged in
.pm2/logs/
but not sent to Sentry. With these changes, it is logged and sent to Sentry.