Exception classes#

The following Akismet-specific exception classes may be raised while using the Akismet API clients:

exception akismet.AkismetError[source]#

Base exception class for Akismet errors.

exception akismet.APIKeyError[source]#

Raised when the supplied Akismet API key/URL are invalid according to the verify-key operation.

This is a subclass of ConfigurationError. If you want to detect the specific case of an invalid key/URL, catch this exception, while if you just want to catch all configuration-related errors (including missing configuration), catch ConfigurationError instead.

exception akismet.ConfigurationError[source]#

Raised when an Akismet configuration error is detected (config missing or invalid).

exception akismet.RequestError[source]#

Raised when an unexpected error occurred when making a request to Akismet.

This is almost always going to be a chained exception wrapping an underlying error from the HTTP client, so inspecting the exception chain may yield useful debugging information.

exception akismet.ProtocolError[source]#

Raised when an unexpected or non-standard response was received from Akismet.

exception akismet.UnknownArgumentError[source]#

Raised when an unknown argument was used as part of an API request.