Look for litestar.HttpException
exceptions in the code (+ in guards & middlewares applied?) of route handlers and add them to raises
(or somewhere else), similarly what https://github.com/Kludex/fastapi-responses does.
from litestar import Litestar, get
from litestar.exceptions import PermissionDeniedException
@get(sync_to_thread=False)
def test(force_perm_fail: bool = False) -> None:
if force_perm_fail:
raise PermissionDeniedException
app = Litestar([test])
No response
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too