Skip to content

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

Description

@jhump

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions