watson.serialize.errors¶
-
exception
watson.serialize.errors.
Base
(code, message='Unknown Error', status_code=406, developer_message=None)[source]¶ An extendible class for responding to exceptions caused within your application.
Usage:
-
__init__
(code, message='Unknown Error', status_code=406, developer_message=None)[source]¶ Initialize the error.
Parameters: - code (int/string) – A unique exception code for the error, gets combined with the status_code
- status_code (int) – The HTTP status code associated with the response (see https://httpstatuses.com/)
- message (string) – A human friendly exception message
- developer_message (string) – A more complex exception message aimed at deveopers
-