module documentation

Types for representing the request status returned by RPCs.

This module exposes a small set of helpers used by the request logic to represent final request statuses and to convert to/from gRPC's google.rpc.Status representation. The lightweight RequestStatus is used where service-specific details are not required. When the SDK is aware of service-level errors the richer RequestStatusExtended from service_error is used instead.

Class RequestStatus A normalized representation of an RPC status.
Class UnfinishedRequestStatus Sentinels used to represent a request that hasn't completed yet.
Function request_status_from_rpc_status Convert a protobuf Status to the SDK's RequestStatus.
Function request_status_to_rpc_status Convert an SDK RequestStatus back into a protobuf Status.
def request_status_from_rpc_status(status: StatusPb) -> RequestStatus: (source)

Convert a protobuf Status to the SDK's RequestStatus.

When service-level error details are available the SDK uses the richer RequestStatusExtended defined in service_error.

def request_status_to_rpc_status(status: RequestStatus) -> StatusPb: (source)

Convert an SDK RequestStatus back into a protobuf Status.