-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Best practices for handling decode failures in a websocket connection #4795
Comments
Hi, this isn't really the right forum for this, as we don't manage the decoder. You either want to ask in https://github.com/grpc/grpc-go or maybe https://github.com/protocolbuffers/protobuf-go. If you are using this software though, you might be interested in the custom error handler documentation: https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/#error-handler. |
Hi Johan, thanks for the response. I dug a little deeper and I think the issue can be remedied in this repo at
If I understand correctly, the decode error is logged but not exposed to the caller. What do you think? I can submit a pull request to do so if that makes sense to you. Also if you agree, I can also open a new feature request or bug report. Let me know if I'm missing something that prompted the original authors to handle the error the current way intentionally. Thanks! |
Sorry, I'm confused. I only just noticed that you were talking about websocket connections. Are you using the https://github.com/tmc/grpc-websocket-proxy to perform bidirectional streaming in the gateway? The gateway doesn't natively support websockets, and as you noticed bidirectional streaming is pretty poorly supported. I'm happy to review a PR if you think you can make something work though. |
correct that we are using https://github.com/tmc/grpc-websocket-proxy |
📚 Documentation
(A clear and concise description of what the issue is.)
I wasn't able to find any documentation around handling decoding failures. I'm new to GRPC ecosystem and we have a GRPC server that needs to accept requests from clients that don't use GRPC. often times, our clients do not follow the best practices of GRPC and send invalid requests. such as
This a developer error but the problem I'm running into is that there is no easy way for us to communicate with our clients of these issues. As a results, these requests just get dropped in our websocket streaming connection and never reach our GRPC servers. So everytime, this happens, we can only retroactively inform our users of these issues.
Any advice on this issue would be greatly appreciated!
The text was updated successfully, but these errors were encountered: