We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f74dd07 commit ff4e981Copy full SHA for ff4e981
src/common/global.filter.ts
@@ -1,5 +1,6 @@
1
import {
2
ArgumentsHost,
3
+ BadRequestException,
4
Catch,
5
HttpException,
6
InternalServerErrorException,
@@ -21,6 +22,9 @@ export class GlobalExceptionFilter extends BaseExceptionFilter {
21
22
}
23
24
let httpException: HttpException = new InternalServerErrorException();
25
+ if (exception instanceof BadRequestException) {
26
+ httpException = exception;
27
+ }
28
if (exception instanceof FileNotExistException) {
29
httpException = new NotFoundException(exception.message);
30
0 commit comments