-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON parse error - Unexpected token 'N', "No connect"... is not valid JSON
#13
Comments
I created a PR if need it #14 |
I think a proper solution for this issue would be to change the exception message in
As you are expecting an error object in the It would work for all sorts of HTTP exceptions from gRPC clients. |
rajibkuet07
added a commit
to rajibkuet07/nestjs-grpc-exceptions
that referenced
this issue
Jun 7, 2024
Handles all sorts of http exceptions from rpc client. No need to use extra try catch for parse error in grpc to http interceptor. Refs: mohsenbostan#13 Refs: mohsenbostan#14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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
The text was updated successfully, but these errors were encountered: