Service errors¶
Error codes¶
Module¶
Module realizes a list of errors
- class crutches_on_wheels.cow.errors.errors.AiohttpClientError[source]¶
Http client error.
see https://docs.aiohttp.org/en/stable/client_reference.html#hierarchy-of-exceptions if class changes, update errors processing in luna3/common/aiohttp_exception_map.py
- class crutches_on_wheels.cow.errors.errors.ApplicationServerError[source]¶
Application server error. .. rubric:: References
- class crutches_on_wheels.cow.errors.errors.Error[source]¶
Common errors class.
- class crutches_on_wheels.cow.errors.errors.ErrorInfo(code, description, detail)[source]¶
VL error.
- errorCode¶
error code
- description¶
short error description
- detail¶
full error description
- asDict()[source]¶
Convert error to dict.
- Return type:
Dict- Returns:
dict with keys “error_code”, “desc”, “detail”, “link”
- format(*formatArgs)[source]¶
The time has come.
- Return type:
- Parameters:
formatArgs – args to format the current
- Returns:
error with formatted detail
>>> error = ErrorInfo(777, '777', 'some {} data {}') >>> error = error.format('useful', '4 u') >>> error.detail 'some useful data 4 u'
- classmethod fromDict(error)[source]¶
Convert dict to error.
- Return type:
- Parameters:
error – dict with keys “error_code”, “desc”, “detail”
- Returns:
ErrorInfo instance
- property link: str¶
Get link with error info.
- class crutches_on_wheels.cow.errors.errors.LunaStreamsRetranslator[source]¶
Luna-streams-retranslator errors