Exceptions

exception restclient.errors.ResourceNotFound
Exception raised when no resource was found at the given url.
exception restclient.errors.Unauthorized
Exception raised when an authorization is required to access to the resource specified.
exception restclient.errors.RequestFailed

Exception raised when an unexpected HTTP error is received in response to a request.

The request failed, meaning the remote HTTP server returned a code other than success, unauthorized, or NotFound.

The exception message attempts to extract the error

You can get the status code by e.http_code, or see anything about the response via e.response. For example, the entire result body (which is probably an HTML error page) is e.response.body.

exception restclient.errors.RequestError
Exception raised when a request is malformed
exception restclient.errors.TransportError
Error raised by a transport
exception restclient.errors.InvalidUrl
Not a valid url for use with this software.

Previous topic

HTTP Transports

This Page

Quick search