Skip to content

REST fallback does not use most fine-grained error code available when parsing errors #206

@MarkDuckworth

Description

@MarkDuckworth

When canonical (gRPC) error codes are mapped to HTTP status codes, in some cases the mapping is lossy. Multiple canonical error codes map to one HTTP status code. For example ABORTED and ALREADY_EXISTS both map to 409. By using only the HTTP status code (409) a client would not be able to differentiate how to retry these errors.

The error response returned from Google's JSON HTTP APIs includes the gRPC error code in error.status, so this behavior can be addressed by parsing error.status and only falling back to the http status code if the grpc code is not provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions