Helpers for converting service-level protobuf errors into SDK types.
This module builds on request_status to represent detailed service
errors (ServiceError PBs) and to decide retriability based on service
semantics and gRPC status codes.
| Class | |
Extended request status that includes parsed service errors. |
| Exception | |
Exception raised for requests that failed with service-level errors. |
| Function | int |
Convert an integer or StatusCode into a StatusCode instance. |
| Function | is |
Return True when an exception indicates a DNS resolution problem. |
| Function | is |
Return True for network errors that look like timeouts. |
| Function | is |
Decide whether an exception should be retried. |
| Function | is |
Return True for transport-level errors such as connection reset. |
| Function | to |
Pack a ServiceError protobuf into a google.protobuf.Any message. |
| Function | to |
Render a ServiceError into a concise human readable string. |
| Variable | code |
Undocumented |
| Variable | |
Undocumented |
Convert an integer or StatusCode into a StatusCode instance.
Useful when reading numeric status codes from protobuf messages.
Decide whether an exception should be retried.
The function recognizes RequestError (service-level errors) and
also checks for common network/transport error conditions.
Return True for transport-level errors such as connection reset.
This is a heuristic based on the textual content of the exception.
Pack a ServiceError protobuf into a google.protobuf.Any message.
This helper is used when converting SDK-level error representations back into gRPC status details.
Render a ServiceError into a concise human readable string.
The function inspects typed details attached to the service error and produces a one-line summary intended for logs and exception messages.