Exceptions

HTTPException

class baize.exceptions.HTTPException(status_code: int = 400, headers: Optional[Mapping[str, str]] = None, content: Optional[Any] = None)
with_traceback()

Exception.with_traceback(tb) – set self.**traceback** to tb and return self.

abort

baize.exceptions.abort(status_code: int = 400, headers: Optional[Mapping[str, str]] = None, content: Optional[Any] = None)NoReturn

raise a HTTPException. Parameters are completely consistent with HTTPException.