Skip to content

Commit 544acf0

Browse files
Merge pull request #2299 from davidrui6/patch-1
Update exception-filters.md
2 parents 433f6cf + afb3454 commit 544acf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/microservices/exception-filters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { RpcException } from '@nestjs/microservices';
3030
@Catch(RpcException)
3131
export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
3232
catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
33-
return throwError(exception.getError());
33+
return throwError(() => exception.getError());
3434
}
3535
}
3636
@@switch
@@ -40,7 +40,7 @@ import { throwError } from 'rxjs';
4040
@Catch(RpcException)
4141
export class ExceptionFilter {
4242
catch(exception, host) {
43-
return throwError(exception.getError());
43+
return throwError(() => exception.getError());
4444
}
4545
}
4646
```

0 commit comments

Comments
 (0)