The app is now wired to GlitchTip with the Sentry SDKs
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
HttpStatus,
|
||||
Logger,
|
||||
} from '@nestjs/common';
|
||||
import * as Sentry from '@sentry/nestjs';
|
||||
import type { Response } from 'express';
|
||||
import { AppException, type AppErrorResponse } from './app.exception';
|
||||
import { ErrorCode, type ErrorCodeValue } from './error-codes';
|
||||
@@ -42,6 +43,9 @@ export class HttpExceptionFilter implements ExceptionFilter {
|
||||
this.logger.error(
|
||||
exception instanceof Error ? exception.stack : String(exception),
|
||||
);
|
||||
if (Sentry.getClient()) {
|
||||
Sentry.captureException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
response.status(statusCode).json(body);
|
||||
|
||||
Reference in New Issue
Block a user