diff --git a/api/src/filters/all-exceptions.exception.filter.ts b/api/src/filters/all-exceptions.exception.filter.ts index 71574609..c9cb1684 100644 --- a/api/src/filters/all-exceptions.exception.filter.ts +++ b/api/src/filters/all-exceptions.exception.filter.ts @@ -31,7 +31,9 @@ export class AllExceptionsFilter implements ExceptionFilter { const errorDataForResponse: JSONAPIError = new JSONAPISerializer.Error( this.handleZodValidationErrorMessages(exception), ); - this.logger.error(errorDataForResponse); + if (this.apiConfig.get('NODE_ENV') !== 'test') { + this.logger.error(errorDataForResponse); + } return response.status(exception.getStatus()).json(errorDataForResponse); } else if (exception instanceof HttpException) { status = exception.getStatus(); @@ -64,13 +66,9 @@ export class AllExceptionsFilter implements ExceptionFilter { }); } if (this.apiConfig.get('NODE_ENV') !== 'test') { - this.logger.error('ENVIRONMENT IN CI'); - this.logger.error(this.apiConfig.get('NODE_ENV')); if (status >= 500) { - this.logger.error('TRIGGERING ERROR'); this.logger.error(errors); } else { - this.logger.error('TRIGGERING WARN'); this.logger.warn(errors); } }