http_exceptions#
- exception starlite.exceptions.http_exceptions.HTTPException#
Bases:
StarLiteException
Base exception for HTTP error responses.
These exceptions carry information to construct an HTTP response.
- __init__(*args: Any, detail: str = '', status_code: Optional[int] = None, headers: Optional[Dict[str, str]] = None, extra: Optional[Union[Dict[str, Any], List[Any]]] = None) None #
Initialize
HTTPException
.Set
detail
andargs
if not provided.- Parameters:
*args – if
detail
kwarg not provided, first arg should be error detail.detail – Exception details or message. Will default to args[0] if not provided.
status_code – Exception HTTP status code.
headers – Headers to set on the response.
extra – An extra mapping to attach to the exception.
- exception starlite.exceptions.http_exceptions.ImproperlyConfiguredException#
Bases:
HTTPException
,ValueError
Application has improper configuration.
- exception starlite.exceptions.http_exceptions.ClientException#
Bases:
HTTPException
Client error.
- exception starlite.exceptions.http_exceptions.ValidationException#
Bases:
ClientException
,ValueError
Client data validation error.
- exception starlite.exceptions.http_exceptions.NotAuthorizedException#
Bases:
ClientException
Request lacks valid authentication credentials for the requested resource.
- exception starlite.exceptions.http_exceptions.PermissionDeniedException#
Bases:
ClientException
Request understood, but not authorized.
- exception starlite.exceptions.http_exceptions.NotFoundException#
Bases:
ClientException
,ValueError
Cannot find the requested resource.
- exception starlite.exceptions.http_exceptions.MethodNotAllowedException#
Bases:
ClientException
Server knows the request method, but the target resource doesn’t support this method.
- exception starlite.exceptions.http_exceptions.TooManyRequestsException#
Bases:
ClientException
Request limits have been exceeded.
- exception starlite.exceptions.http_exceptions.InternalServerException#
Bases:
HTTPException
Server encountered an unexpected condition that prevented it from fulfilling the request.
Bases:
InternalServerException
Server is not ready to handle the request.
Exception status code.
- exception starlite.exceptions.http_exceptions.NoRouteMatchFoundException#
Bases:
InternalServerException
A route with the given name could not be found.
- exception starlite.exceptions.http_exceptions.TemplateNotFoundException#
Bases:
InternalServerException
Referenced template could not be found.