Skip to content

Exceptions API

exceptions

Custom exception hierarchy for the library.

WebTransportError

Manage the base exception for all WebTransport errors.

category property

category: str

Return the error category based on the class name.

is_fatal property

is_fatal: bool

Return True if the error is fatal.

is_retriable property

is_retriable: bool

Return True if the error is transient.

from_cause classmethod

from_cause(message: str, *, cause: Exception, error_code: int | None = None, details: dict[str, Any] | None = None, **kwargs: Any) -> Self

Instantiate a domain exception from a causal exception preserving state traits.

to_dict

to_dict() -> dict[str, Any]

Serialize the exception to a dictionary.

AuthenticationError

Manage authentication-related errors.

CertificateError

Manage certificate-related errors.

ClientError

Manage client-specific errors.

ConfigurationError

Manage configuration-related errors.

ConnectionError

Manage connection-related errors.

DatagramError

Manage datagram-related errors.

FlowControlError

Manage flow control errors.

HandshakeError

Manage handshake-related errors.

ProtocolError

Manage protocol violation errors.

ServerError

Manage server-specific errors.

SessionError

Manage WebTransport session errors.

SessionClosedError

Signal that the WebTransport session has been closed gracefully.

StreamError

Manage stream-related errors.

TimeoutError

Manage timeout-related errors.