We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a25f3c9 commit a05b4c8Copy full SHA for a05b4c8
src/kafka/error/filters/kafka.error.filter.ts
@@ -1,4 +1,4 @@
1
-import { ArgumentsHost, Catch } from '@nestjs/common';
+import { ArgumentsHost, Catch, Optional } from '@nestjs/common';
2
import {
3
RpcArgumentsHost,
4
RpcExceptionFilter,
@@ -9,7 +9,9 @@ import { DebuggerService } from 'src/common/debugger/services/debugger.service';
9
10
@Catch(RpcException)
11
export class KafkaErrorFilter implements RpcExceptionFilter<RpcException> {
12
- constructor(private readonly debuggerService: DebuggerService) {}
+ constructor(
13
+ @Optional() private readonly debuggerService: DebuggerService
14
+ ) {}
15
16
catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
17
const ctx: RpcArgumentsHost = host.switchToRpc();
0 commit comments