Skip to content

Commit a05b4c8

Browse files
Update kafka.error.filter.ts
1 parent a25f3c9 commit a05b4c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/kafka/error/filters/kafka.error.filter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ArgumentsHost, Catch } from '@nestjs/common';
1+
import { ArgumentsHost, Catch, Optional } from '@nestjs/common';
22
import {
33
RpcArgumentsHost,
44
RpcExceptionFilter,
@@ -9,7 +9,9 @@ import { DebuggerService } from 'src/common/debugger/services/debugger.service';
99

1010
@Catch(RpcException)
1111
export class KafkaErrorFilter implements RpcExceptionFilter<RpcException> {
12-
constructor(private readonly debuggerService: DebuggerService) {}
12+
constructor(
13+
@Optional() private readonly debuggerService: DebuggerService
14+
) {}
1315

1416
catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
1517
const ctx: RpcArgumentsHost = host.switchToRpc();

0 commit comments

Comments
 (0)