@@ -18,7 +18,7 @@ export class ExceptionFilter implements GqlExceptionFilter {
18
18
private readonly normalizer : ExceptionNormalizer ,
19
19
) { }
20
20
21
- catch ( exception : Error , args : ArgumentsHost ) {
21
+ async catch ( exception : Error , args : ArgumentsHost ) {
22
22
if ( exception && ( exception as any ) . type === 'request.aborted' ) {
23
23
this . logger . warning ( 'Request aborted' ) ;
24
24
return ;
@@ -43,7 +43,7 @@ export class ExceptionFilter implements GqlExceptionFilter {
43
43
if ( args . getType ( ) === 'graphql' ) {
44
44
this . respondToGraphQL ( normalized , args ) ;
45
45
}
46
- this . respondToHttp ( normalized , args ) ;
46
+ await this . respondToHttp ( normalized , args ) ;
47
47
}
48
48
49
49
private respondToGraphQL ( ex : ExceptionJson , _args : ArgumentsHost ) {
@@ -53,7 +53,7 @@ export class ExceptionFilter implements GqlExceptionFilter {
53
53
throw Object . assign ( new Error ( ) , out ) ;
54
54
}
55
55
56
- private respondToHttp ( ex : ExceptionJson , args : ArgumentsHost ) {
56
+ private async respondToHttp ( ex : ExceptionJson , args : ArgumentsHost ) {
57
57
const { codes } = ex ;
58
58
const status = codes . has ( 'NotFound' )
59
59
? HttpStatus . NOT_FOUND
@@ -78,7 +78,7 @@ export class ExceptionFilter implements GqlExceptionFilter {
78
78
} ;
79
79
80
80
const res = args . switchToHttp ( ) . getResponse ( ) ;
81
- this . http . reply ( res , out , status ) ;
81
+ await this . http . reply ( res , out , status ) ;
82
82
}
83
83
84
84
logIt ( info : ExceptionJson , error : Error ) {
0 commit comments