MCPcopy
hub / github.com/encode/starlette / websocket_raise_http_exception

Function websocket_raise_http_exception

tests/test_applications.py:81–82  ·  view source on GitHub ↗
(websocket: WebSocket)

Source from the content-addressed store, hash-verified

79
80
81async def websocket_raise_http_exception(websocket: WebSocket) -> None:
82 raise HTTPException(status_code=401, detail="Unauthorized")
83
84
85class CustomWSException(Exception):

Callers

nothing calls this directly

Calls 1

HTTPExceptionClass · 0.90

Tested by

no test coverage detected