Debian Codegraph @

docs/examples/onboarding/flask/http_errors.py

raw
1 from litestar import Litestar, get
2 from litestar.exceptions import HTTPException
3
4
5 @get("/", sync_to_thread=False)
6 def index() -> None:
7 raise HTTPException(status_code=400, detail="this did not work")
8
9
10 app = Litestar(route_handlers=[index])