websocket/_exceptions.py

The _exceptions.py file

Define WebSocket exceptions

exception websocket._exceptions.WebSocketAddressException[source]

If the websocket address info cannot be found, this exception will be raised.

exception websocket._exceptions.WebSocketBadStatusException(message, status_code, status_message=None, resp_headers=None)[source]

WebSocketBadStatusException will be raised when we get bad handshake status code.

__init__(message, status_code, status_message=None, resp_headers=None)[source]
exception websocket._exceptions.WebSocketConnectionClosedException[source]

If remote host closed the connection or some network error happened, this exception will be raised.

exception websocket._exceptions.WebSocketException[source]

WebSocket exception class.

exception websocket._exceptions.WebSocketPayloadException[source]

If the WebSocket payload is invalid, this exception will be raised.

exception websocket._exceptions.WebSocketProtocolException[source]

If the WebSocket protocol is invalid, this exception will be raised.

exception websocket._exceptions.WebSocketProxyException[source]

WebSocketProxyException will be raised when proxy error occurred.

exception websocket._exceptions.WebSocketTimeoutException[source]

WebSocketTimeoutException will be raised at socket timeout during read/write data.