websocket_exceptions#

exception starlite.exceptions.websocket_exceptions.WebSocketException#

Bases: StarLiteException

Exception class for websocket related events.

__init__(*args: Any, detail: str, code: int = 4500) None#

Initialize WebSocketException.

Parameters:
  • *args – Any exception args.

  • detail – Exception details.

  • code – Exception code. Should be a number in the >= 1000.

code: int#

Exception code.

Should be a number in the 4000+ range.

exception starlite.exceptions.websocket_exceptions.WebSocketDisconnect#

Bases: WebSocketException

Exception class for websocket disconnect events.

__init__(*args: Any, detail: str, code: int = 1000) None#

Initialize WebSocketDisconnect.

Parameters:
  • *args – Any exception args.

  • detail – Exception details.

  • code – Exception code. Should be a number in the >= 1000.