diff --git a/src/api/api.ts b/src/api/api.ts index 3620ccd..1c52de1 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -26,13 +26,13 @@ Sentry.init({ analyticsRoute(app); // The request handler must be the first middleware on the app -app.use(Sentry.Handlers.requestHandler()); +app.use(Sentry.Handlers.requestHandler() as express.RequestHandler); // TracingHandler creates a trace for every incoming request app.use(Sentry.Handlers.tracingHandler()); // The error handler must be registered before any other error middleware and after all controllers -app.use(Sentry.Handlers.errorHandler()); +app.use(Sentry.Handlers.errorHandler() as express.ErrorRequestHandler); // Optional fallthrough error handler app.use(function onError(err: any, req: any, res: any, next: any) {