Function
errorhandler
(websocket: WebSocket, call_next)
Source from the content-addressed store, hash-verified
| 240 | |
| 241 | @websocket_middleware |
| 242 | async def errorhandler(websocket: WebSocket, call_next): |
| 243 | try: |
| 244 | return await call_next() |
| 245 | except Exception as e: |
| 246 | await websocket.close(code=status.WS_1006_ABNORMAL_CLOSURE, reason=repr(e)) |
| 247 | |
| 248 | myapp = make_app(middleware=[Middleware(errorhandler)]) |
| 249 | client = TestClient(myapp) |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…