Exception classes#
The following Akismet-specific exception classes may be raised while using the Akismet API clients:
Base exception class for Akismet errors.
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), catchConfigurationError
instead.
Raised when an Akismet configuration error is detected (config missing or invalid).
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.
Raised when an unexpected or non-standard response was received from Akismet.
Raised when an unknown argument was used as part of an API request.