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

not enough arguments in call to runtime.HTTPError #162

Closed
liaoliaopro opened this issue May 17, 2016 · 1 comment
Closed

not enough arguments in call to runtime.HTTPError #162

liaoliaopro opened this issue May 17, 2016 · 1 comment

Comments

@liaoliaopro
Copy link

Compile error:

bidong@ubuntu:~/.../message/service$ go build
# wajinzi.me/gmcore/message/service
./account.service.pb.gw.go:947: not enough arguments in call to runtime.HTTPError
./account.service.pb.gw.go:951: not enough arguments in call to forward_AccountService_CreateAccount_0
./account.service.pb.gw.go:970: not enough arguments in call to runtime.HTTPError
./account.service.pb.gw.go:974: not enough arguments in call to forward_AccountService_GetAccounts_0
./account.service.pb.gw.go:993: not enough arguments in call to runtime.HTTPError
./account.service.pb.gw.go:997: not enough arguments in call to forward_AccountService_GetAccount_0
./account.service.pb.gw.go:1016: not enough arguments in call to runtime.HTTPError
./account.service.pb.gw.go:1020: not enough arguments in call to forward_AccountService_UpdateAccount_0
./account.service.pb.gw.go:1039: not enough arguments in call to runtime.HTTPError
./account.service.pb.gw.go:1043: not enough arguments in call to forward_AccountService_UpdateAccountPassword_0
./account.service.pb.gw.go:1043: too many errors

Calling HTTPError with 4 parameters in generated code:

runtime.HTTPError(ctx, w, req, err)

But HTTPError needs 5 parameters:

func DefaultHTTPError(ctx context.Context, marshaler Marshaler, w http.ResponseWriter, _ *http.Request, err error) {

@liaoliaopro
Copy link
Author

Sorry my mistake. Update grpc-go to latest version fixed 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

1 participant