File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ import {
22 ArgumentsHost ,
33 Catch ,
44 ExceptionFilter ,
5+ HttpException ,
56 HttpStatus ,
67 Logger ,
78} from "@nestjs/common" ;
89import { Request , Response } from "express" ;
910import { SlackService } from "nestjs-slack" ;
11+ import { WsException } from "@nestjs/websockets" ;
1012
1113@Catch ( ) // 모든 예외를 캐치
1214export class AllExceptionsFilter implements ExceptionFilter {
@@ -15,6 +17,14 @@ export class AllExceptionsFilter implements ExceptionFilter {
1517 constructor ( private readonly slackService : SlackService ) { }
1618
1719 catch ( exception : unknown , host : ArgumentsHost ) {
20+ if (
21+ exception instanceof HttpException ||
22+ exception instanceof WsException
23+ ) {
24+ // 이미 HttpExceptionFilter 및 WsExceptionFilter에서 처리된 예외는 무시
25+ return ;
26+ }
27+
1828 const ctx = host . switchToHttp ( ) ;
1929 const response = ctx . getResponse < Response > ( ) ;
2030 const request = ctx . getRequest < Request > ( ) ;
You can’t perform that action at this time.
0 commit comments