Skip to content

blackbull.client.exceptions

blackbull.client.exceptions

Exception hierarchy for the protocol-layer client.

All client-side errors derive from ClientError so callers can catch the whole family with one except clause and still distinguish specific causes.

ClientError

Bases: Exception

Base class for all client-side errors.

ConnectionError

Bases: ClientError

The connection was closed unexpectedly (e.g. server sent GOAWAY).

HandshakeError

Bases: ClientError

A WebSocket or HTTP/2 handshake failed.

ProtocolError

Bases: ClientError

The client refused to send a request that violates the protocol.

ResponseTooLarge

Bases: ClientError

The peer's response head passed a byte budget the client set.

Distinct from :class:ProtocolError: the response was well-formed as far as it was read. What failed is a limit this client chose, so a caller that wants the peer's output anyway can raise the budget rather than conclude the peer is broken.

StreamReset

Bases: ClientError

The HTTP/2 stream was reset by the peer (RST_STREAM).