MCPcopy
hub / github.com/fastapi/fastapi / catcher

Function catcher

tests/test_ws_router.py:217–222  ·  view source on GitHub ↗
(websocket, call_next)

Source from the content-addressed store, hash-verified

215
216 @websocket_middleware
217 async def catcher(websocket, call_next):
218 try:
219 return await call_next()
220 except Exception as e: # pragma: no cover
221 caught.append(e)
222 raise
223
224 myapp = make_app(middleware=[Middleware(catcher)])
225

Callers

nothing calls this directly

Calls 1

call_nextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…