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

Class WebSocketDenialResponse

starlette/testclient.py:92–99  ·  starlette/testclient.py::WebSocketDenialResponse

A special case of `WebSocketDisconnect`, raised in the `TestClient` if the `WebSocket` is closed before being accepted with a `send_denial_response()`.

Source from the content-addressed store, hash-verified

90
91
92class WebSocketDenialResponse( class="cm"># type: ignore[misc]
93 httpx.Response,
94 WebSocketDisconnect,
95):
96 class="st">"""
97 A special case of `WebSocketDisconnect`, raised in the `TestClient` if the
98 `WebSocket` is closed before being accepted with a `send_denial_response()`.
99 class="st">"""
100
101
102class WebSocketTestSession:

Callers 1

_raise_on_closeMethod · 0.85

Calls

no outgoing calls

Tested by 1

_raise_on_closeMethod · 0.68