REST fallback does not use most fine-grained error code available when parsing errors #1634
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
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
andALREADY_EXISTS
both map to409
. 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 parsingerror.status
and only falling back to the http status code if the grpc code is not provided.The text was updated successfully, but these errors were encountered: