restish.error¶
- exception restish.error.HTTPClientError(*args, **kwargs)¶
Bases: restish.error.HTTPError
Base class for all HTTP client (4xx) errors.
- exception restish.error.HTTPError(*args, **kwargs)¶
Bases: restish.error.RestishException
Base class for all HTTP (4xx and 5xx) errors.
Each error response factory defined in restish.http is mirrored by an exception type derived from HTTPException.
The derived exception class is expected to override response_factory (None by default), providing a callable that accepts all the positional and keyword args and returns an http.Response instance. Typically, response_factory can be set to one of the HTTP response convenience functions in the http module.
- make_response()¶
Create an HTTP response for this exception type.
- exception restish.error.HTTPServerError(*args, **kwargs)¶
Bases: restish.error.HTTPError
Base class for all HTTP server (5xx) errors.
- exception restish.error.RestishException¶
Bases: exceptions.Exception
Base class for all restish exceptions.