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

RESOURCE_EXHAUSTED -> 503 #431

Closed
jhspaybar opened this issue Jul 11, 2017 · 1 comment
Closed

RESOURCE_EXHAUSTED -> 503 #431

jhspaybar opened this issue Jul 11, 2017 · 1 comment

Comments

@jhspaybar
Copy link

Right now it appears that HTTPStatusFromCode converts a RESOURCE_EXHAUSTED into a 403. I'd like to convert this to a 503, and it looks like I need to do this by calling withProtoErrorHandler and passing in my mux? I will be more or less copy/pasting the DefaultProtoErrorHandler method just swapping out the status mapping function and before I went this route, wanted to see if there was a better way to pull this off.

Thanks.

@achew22
Copy link
Collaborator

achew22 commented Dec 14, 2017

Unfortunately I'm not sure of a better way without changing things in grpc-gateway. I think a case could be made that 403 isn't the right code for this (that is forbidden, right?) and I'd be open to changing it to something different. Could you send a PR?

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

No branches or pull requests

2 participants