-
Notifications
You must be signed in to change notification settings - Fork 763
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
Response with code != OK triggers both success and error callbacks #418
Comments
Having this issue with a |
As a followup, once we identified that the issue we were having was because of this double-messaging thing, we dropped into the server side and made sure that https://grpc.github.io/grpc/python/grpc.html#service-side-context |
It is possible for gRPC responses to both have a code set to something that is not
OK
, and still have a response. For example, the following Python server code will return that payload, using the official gRPC implementation:On the wire, this returns first the correctly serialized response object, then a headers block with
grpc-status: 10
andgrpc-message: error details
.When using grpc-web with this end point, the client calls the callback TWICE: First with the response message, then a second time with the error. The official NodeJS client, and the other gRPC clients I've tried this with, treat this as a gRPC error, and ignore the response message.
The text was updated successfully, but these errors were encountered: