MCPcopy Index your code
hub / github.com/encode/starlette / app

Function app

tests/middleware/test_errors.py:18–19  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

16 test_client_factory: TestClientFactory,
17) -> None:
18 async def app(scope: Scope, receive: Receive, send: Send) -> None:
19 raise RuntimeError("Something went wrong")
20
21 def error_500(request: Request, exc: Exception) -> JSONResponse:
22 return JSONResponse({"detail": "Server Error"}, status_code=500)

Calls 1

ResponseClass · 0.90

Tested by

no test coverage detected