Open
Description
Hi!
I have an architecture with an apigateway(grpc client) and a microservice(grpc server) .
When the grpc server is down, the GrpcToHttpInterceptor in controller catch this error:
{
code: 14,
details: "No connection established. Last error: connect ECONNREFUSED 0.0.0.0:50051 (2024-04-09T08:38:21.111Z)",
metadata: {
internalRepr: {
},
options: {
},
},
}
The JSON.parse(err.details)
brake in this case. Is it possible the if statement isn't checking in the right way?
I've also check with debug and I attach a screen
Here my controller in apigateway and interceptor
@UseInterceptors(GrpcToHttpInterceptor)
@Controller('/api/actors')
export class ActorController {
constructor(
private readonly actorsService: ApiActorService,
private readonly logger: WinstonLoggerService,
) {}
@Post()
@ApiOperation({ summary: 'Create an actor' })
create(@Body() actor: CreateActorRequest, @GetTraceId() traceID: string): Promise<ActorResponse> {
return this.actorsService.create(actor, { traceID });
}
}
Metadata
Metadata
Assignees
Labels
No labels