Removed sentry error handler

This commit is contained in:
Leon Meier 2023-05-16 00:03:54 +02:00
parent d7abadf6a6
commit 3819d007a5

View File

@ -89,15 +89,6 @@ app.use(routes);
// The error handler must be before any other error middleware and after all controllers // The error handler must be before any other error middleware and after all controllers
app.use(Sentry.Handlers.errorHandler()); app.use(Sentry.Handlers.errorHandler());
// Optional fallthrough error handler
app.use(function onError(err: Error, req: Request, res: Response, next: NextFunction) {
// The error id is attached to `res.sentry` to be returned
// and optionally displayed to the user for support.
res.statusCode = 500;
// @ts-ignore
res.end(res.sentry + '\n');
});
app.listen(config.global.http_port, config.global.http_listen_address, () => { app.listen(config.global.http_port, config.global.http_listen_address, () => {
log.web.info(`Listening at http://${config.global.http_listen_address}:${config.global.http_port}`); log.web.info(`Listening at http://${config.global.http_listen_address}:${config.global.http_port}`);
}); });