faust.web.exceptions

HTTP and related errors.

exception faust.web.exceptions.WebError(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Web related error.

Web related errors will have a status code, and a detail for the human readable error string.

It may also keep extra_context.

detail: str = 'Default not set on class'
code: int = None
extra_context: Dict
exception faust.web.exceptions.ServerError(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Internal Server Error (500).

code: int = 500
detail: str = 'Internal server error.'
exception faust.web.exceptions.ValidationError(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Invalid input in POST data (400).

code: int = 400
detail: str = 'Invalid input.'
exception faust.web.exceptions.ParseError(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Malformed request (400).

code: int = 400
detail: str = 'Malformed request.'
exception faust.web.exceptions.AuthenticationFailed(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Incorrect authentication credentials (401).

code: int = 401
detail: str = 'Incorrect authentication credentials'
exception faust.web.exceptions.NotAuthenticated(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Authentication credentials were not provided (401).

code: int = 401
detail: str = 'Authentication credentials were not provided.'
exception faust.web.exceptions.PermissionDenied(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

No permission to perform action (403).

code: int = 403
detail: str = 'You do not have permission to perform this action.'
exception faust.web.exceptions.NotFound(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Resource not found (404).

code: int = 404
detail: str = 'Not found.'
exception faust.web.exceptions.MethodNotAllowed(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

HTTP Method not allowed (405).

code: int = 405
detail: str = 'Method not allowed.'
exception faust.web.exceptions.NotAcceptable(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Not able to satisfy the request Accept header (406).

code: int = 406
detail: str = 'Could not satisfy the request Accept header.'
exception faust.web.exceptions.UnsupportedMediaType(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Request contains unsupported media type (415).

code: int = 415
detail: str = 'Unsupported media type in request.'
exception faust.web.exceptions.Throttled(detail: Optional[str] = None, *, code: Optional[int] = None, **extra_context: Any)[source]

Client is sending too many requests to server (429).

code: int = 429
detail: str = 'Request was throttled.'