diff --git a/server/src/utils/http-exception.filter.ts b/server/src/utils/http-exception.filter.ts index f9a42a4..68e100f 100644 --- a/server/src/utils/http-exception.filter.ts +++ b/server/src/utils/http-exception.filter.ts @@ -11,7 +11,6 @@ import * as Rollbar from 'rollbar'; @Catch(HttpException) export class HttpExceptionFilter implements ExceptionFilter { - private readonly ignoredCodes = [401, 404]; private rollbar: Rollbar; constructor(@Inject(ROLLBAR_CONFIG) private rollbarConfig) { @@ -24,7 +23,9 @@ export class HttpExceptionFilter implements ExceptionFilter { const request = ctx.getRequest(); const status = exception.getStatus(); - if (this.rollbar && !this.ignoredCodes.includes(status)) { + const isValidStatusCode = status >= 500; + + if (this.rollbar && isValidStatusCode) { this.rollbar.error(exception); }