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

Function _lookup_exception_handler

starlette/_exception_handler.py:16–20  ·  view source on GitHub ↗
(exc_handlers: ExceptionHandlers, exc: Exception)

Source from the content-addressed store, hash-verified

14
15
16def _lookup_exception_handler(exc_handlers: ExceptionHandlers, exc: Exception) -> ExceptionHandler | None:
17 for cls in type(exc).__mro__:
18 if cls in exc_handlers:
19 return exc_handlers[cls]
20 return None
21
22
23def wrap_app_handling_exceptions(app: ASGIApp, conn: Request | WebSocket) -> ASGIApp:

Callers 1

wrapped_appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected