Skip to content

Commit 1f2e2ad

Browse files
authored
Added logging to CustomValidationExceptionFilter
1 parent 0370914 commit 1f2e2ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/filters/validation-exception.filter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export class ValidationExceptionFilter implements ExceptionFilter {
99
const ctx = host.switchToHttp();
1010
const response = ctx.getResponse();
1111
const status = exception.getStatus();
12+
13+
const logger = new MyLogger();
14+
logger.setContext('CustomValidationException');
15+
logger.error(JSON.stringify(exception.validationErrors));
1216

1317
const resp: FailedResponseDTO = {
1418
errorMessage: exception.message,

0 commit comments

Comments
 (0)