Skip to content

miniproto.invoke.wrap_transport_failure

wrap_transport_failure(exc: BaseException, raw_request: object, *, connected: bool) -> RpcError

Translate a transport exception to the RPC-level error exposed to callers.

A disconnected sender takes precedence over a timeout classification so retry policy can distinguish a lost client lifecycle from an individual request delay.

Parameters:

  • exc (BaseException) – Transport-layer exception raised while processing the request.
  • raw_request (object) – Original raw request retained on the resulting RPC error.
  • connected (bool) – Whether the sender was connected when the failure was classified.