Client errors

Documentation of client errors generated from Azion’s ReST API.

Exceptions used to describe errors when handling Azion API requests/responses.

Documentation of possible errors to be returned from the API can be found here:

exception azion.exceptions.AzionError(response)

This class represents all errors related to response.

Whenever Azion’s API returns a error code, we catch them and provide a better and uniform way to handle/inspect them.


HTTP response that originated the error.


HTTP status code raised by the error.


List of errors generated from the response.

exception azion.exceptions.AzionException

Base class exception. All exceptions related to requests/responses errors are inherited from it.

exception azion.exceptions.BadRequest(response)

Indicate that the server could not understand the request due to invalid syntax.

More info here:

exception azion.exceptions.Conflict(response)

Indicate a request conflict with current state of the server.

exception azion.exceptions.Forbidden(response)

Indicate that the server understood the request but refuses to authorize it.

More info here:

exception azion.exceptions.MethodNotAllowed(response)

Indicate that the request method is known by the server but has been disabled and cannot be used.

More info here:

exception azion.exceptions.NotAcceptable(response)

Indicate that a response matching the list of acceptable values defined in Accept-Charset and Accept-Language cannot be served.

More info here:

exception azion.exceptions.NotFound(response)

Indicate that the server can’t find the requested resource. Links which lead to a 404 page are often called broken or dead links.

More info here:

exception azion.exceptions.TooManyRequests(response)

Indicate he user has sent too many requests in a given amount of time (“rate limiting”).

More info here:

exception azion.exceptions.Unauthorized(response)

Indicate that the request has not been applied because it lacks valid authentication credentials for the target resource.

More info here:


Handle the request that failed to retrieve an appropriate response.

Parameters:response (object) – requests Response object.