djblets.webapi.errors¶
Error classes and codes for WebAPI.
- class WebAPIError(code, msg, http_status=400, headers={})¶
Bases:
object
An API error, containing an error code and human readable message.
- __init__(code, msg, http_status=400, headers={})¶
- __repr__()¶
Return repr(self).
- with_overrides(msg=None, headers=None)¶
Overrides the default message and/or headers for an error.
- with_message(msg)¶
Overrides the default message for a WebAPIError with something more context specific.
Example: return ENABLE_EXTENSION_FAILED.with_message(‘some error message’)