Skip to content

T3RpcError

Base classes

Name Children Inherits
T3Error
pyt3client.errors
Base class for every error pyt3client raises.

⋔ Inheritance diagram

graph TD
  106982432063136["errors.T3RpcError"]
  106982420250208["errors.T3Error"]
  129768776220000["builtins.Exception"]
  129768776220864["builtins.BaseException"]
  129768776280576["builtins.object"]
  106982420250208 --> 106982432063136
  129768776220000 --> 106982420250208
  129768776220864 --> 129768776220000
  129768776280576 --> 129768776220864

🛈 DocStrings

Bases: T3Error

A native RPC failed: the server ended the request with a failure, or the socket closed.

Native RPC is Effect RPC over T3 Code's WebSocket (see pyt3client.native). A request that fails ends with an Exit whose cause is a typed error (Fail, such as OrchestrationV2DispatchCommandError), a defect (Die) or an interruption.

Source code in src/pyt3client/errors.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
class T3RpcError(T3Error):
    """A native RPC failed: the server ended the request with a failure, or the socket closed.

    Native RPC is Effect RPC over T3 Code's WebSocket (see `pyt3client.native`). A
    request that fails ends with an `Exit` whose cause is a typed error (`Fail`, such
    as `OrchestrationV2DispatchCommandError`), a defect (`Die`) or an interruption.
    """

    def __init__(self, tag: str, message: str, *, cause: object = None) -> None:
        super().__init__(f"{tag}: {message}")
        self.tag = tag
        self.message = message
        self.cause = cause
        """The failure as the server encoded it (JSON), if any."""

cause instance-attribute

cause = cause

The failure as the server encoded it (JSON), if any.

:fa-brands-github: Show source on GitHub