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

Client does not report correct error codes per the spec for HTTP status code mapping #1427

Open
jhump opened this issue May 30, 2024 · 1 comment
Labels

Comments

@jhump
Copy link
Member

jhump commented May 30, 2024

A well-formed gRPC response always has an HTTP status code of “200 OK”. The gRPC docs specify a table for mapping other HTTP status codes to gRPC error codes: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md.

The client in this package varies from the above table. Specifically, here are HTTP status codes which produce an unexpected error code:

HTTP status code Expected error code Actual error code
400 Bad Request internal unknown
404 Not Found unimplemented unknown
409 Conflict unknown aborted
412 Precondition Failed unknown failed_precondition
429 Too Many Requests unavailable unknown
502 Bad Gateway unavailable unknown
504 Gateway Timeout unavailable unknown
@sampajano
Copy link
Collaborator

@jhump Thanks a lot for reporting! Will take a look soon!

@sampajano sampajano added the spec label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants