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

Function http_exception

tests/test_applications.py:36–37  ·  tests/test_applications.py::http_exception
(request: Request, exc: HTTPException)

Source from the content-addressed store, hash-verified

34
35
36async def http_exception(request: Request, exc: HTTPException) -> JSONResponse:
37 return JSONResponse({class="st">"detail": exc.detail}, status_code=exc.status_code)
38
39
40def func_homepage(request: Request) -> PlainTextResponse:

Callers

nothing calls this directly

Calls 1

JSONResponseClass · 0.90

Tested by

no test coverage detected