Exceptions¶
CombadgeError ¶
BackendError ¶
Base error for any backend errors.
Examples:
Handling inner error:
>>> try:
>>> client.method()
>>> except BackendError as e:
>>> match e.inner:
>>> case httpx.TimeoutException():
>>> # Handle timeout error.
>>> case _:
>>> raise
Wrapping client call (only needed for a new backend implementation):
Source code in combadge/core/errors.py
__init__ ¶
Instantiate the backend error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inner
|
BaseException
|
wrapped backend client exception |
required |