-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
googleapis/gax-nodejs
#1633Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.