-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
proxy: inconsistent error messages between unary and stream response #538
Comments
it looks like the unary rpc error message is defined here (inside grpc-gateway/runtime/errors.go Line 93 in 7542c76
and the stream rpc error message is defined here (inside grpc-gateway/runtime/handler.go Line 176 in 8db8c1a
|
I agree that this is a problem. The reason for the streaming error being the way it is seems to be to make it fit into the I think actually the solution to this problem is to move away from our custom error types and just use the The @tmc @achew22 thoughts on this? Would obviously break backwards compatibility in terms of the message returned from errors, but some change here is obviously needed. |
Making this change makes |
I'm generally supportive of any experimentation people want to make in the handlers as long as they provide them as an alternative to the default. The breaking change would be modifying the default return type in the error case, but adding a new handler is totally kosher in my book. @johanbrandhorst, would you like to play around with upstreaming that style of error handling into grpc-gateway? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
i am using
google.golang.org/grpc/status
to create errors sent in server responses. However, i noticed that my client is receiving different messages depending on whether the rpc has a unary or stream response.example body response from a unary rpc:
example body response from a stream rpc:
I expected the response body for an error to be the same message shape for both unary and stream rpcs.
The text was updated successfully, but these errors were encountered: