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

Function read_body_and_raise_exc

tests/test_exceptions.py:41–43  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

39
40
41async def read_body_and_raise_exc(request: Request) -> None:
42 await request.body()
43 raise BadBodyException(422)
44
45
46async def handler_that_reads_body(request: Request, exc: BadBodyException) -> JSONResponse:

Callers

nothing calls this directly

Calls 2

BadBodyExceptionClass · 0.85
bodyMethod · 0.80

Tested by

no test coverage detected