MCPcopy
hub / github.com/fastapi/fastapi / catching_dep

Function catching_dep

tests/test_dependency_after_yield_raise.py:12–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11
12def catching_dep() -> Any:
13 try:
14 yield "s"
15 except CustomError as err:
16 raise HTTPException(status_code=418, detail="Session error") from err
17
18
19def broken_dep() -> Any:

Callers

nothing calls this directly

Calls 1

HTTPExceptionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…