-
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
refactor mux.go #411
refactor mux.go #411
Conversation
Thank you for your contribution. That's a very good point. This PR itself looks good to me. But let me
I'd really appreciate it if you give me some feedback. The current status
This PRAnd this PR is trying to dedupe the implementation by adding two wrapper functions.
Questions
|
hi, @yugui , thanks for your comment. |
Because gRPC spec says
For the first part, actually there is no strong reason, but I wanted to use an option in order to change the behavior of the error handler instead of modify the variable directly.
The ProtoErrorHandler returns error as status proto, so client can parse the response with the proto. |
Committed, changes are: However, I believe this commit is just a start of "error handling mechanism" overhaul. I don't think a HTTP server like grpc-gateway should
"between server and client" I suggest grpc-gateway should transfer
|
Code duplication is not good.