Skip to content
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

"proto: no coders for int" printed whenever a gRPC error is returned over grpc-gateway. #259

Closed
johanbrandhorst opened this issue Nov 11, 2016 · 1 comment

Comments

@johanbrandhorst
Copy link
Collaborator

I've been able to reproduce this using the very example server suggested in the main README.md. Steps to reproduce:

  1. Compile grpc-gateway-out and go_out of the example echo service.
  2. Using the example server implementation, use go run to start the server. It will complain about not being able to connect to your backend gRPC server, but that's fine.
  3. Send a simple cURL request to the HTTP API
curl -X POST http://localhost:8080/v1/example/echo

In the console of the grpc-gateway server you will get the proto: no coders for int message.

The source of the message is in https://github.com/golang/protobuf/blob/4bd1920723d7b7c925de087aa32e2187708897f7/proto/properties.go#L349.

The reason for it being printed appears to be that grpc-gateway creates an error struct with a Code of type int.

See

Code int `protobuf:"bytes,2,name=code" json:"code"`
.

This issue has been encountered in several places downstream already: gogo/protobuf#178 and cockroachdb/cockroach#10484 at the least.

@tmc
Copy link
Collaborator

tmc commented Nov 11, 2016

PR #256 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants