Jump to >


Error classes and codes for WebAPI.

class WebAPIError(code, msg, http_status=400, headers={})[source]

Bases: object

An API error, containing an error code and human readable message.

__init__(code, msg, http_status=400, headers={})[source]

Return repr(self).

with_overrides(msg=None, headers=None)[source]

Overrides the default message and/or headers for an error.


Overrides the default message for a WebAPIError with something more context specific.

Example: return ENABLE_EXTENSION_FAILED.with_message(‘some error message’)

exception WebAPITokenGenerationError[source]

Bases: Exception

An error generating a Web API token.