Errors¶
Raise them to answer with an error, or with an exact response. See Errors and hooks.
HTTPException ¶
HTTPException(status: int, detail: str | None = None, *, headers: HeaderItems = ())
Raise it to answer with an HTTP error: {"detail": ...} as JSON.
detail: the message; the standard reason if omittedheaders: extra response headers, a dict or pairs
Guide: https://3d3n-pyc.github.io/korvex/errors-and-hooks/
RequestValidationError ¶
RequestValidationError(errors: list[dict])
Raised when a request doesn't match a handler's annotations: a 422 with errors.
Guide: https://3d3n-pyc.github.io/korvex/validation/#errors