aiorocket2.exceptions¶
Exceptions used by aiorocket2
Exceptions
|
High-level API error that always carries the raw API payload and (if available) HTTP status. |
- exception aiorocket2.exceptions.xRocketAPIError(payload, status=None)[source]¶
Bases:
ExceptionHigh-level API error that always carries the raw API payload and (if available) HTTP status.
- Parameters:
payload (Mapping[str, Any])
status (int | None)
- Return type:
None
- message¶
Human-readable error message.
- payload¶
Raw JSON payload returned by the API.
- status¶
HTTP status code (if known).
Example
- try:
await client.create_invoice(…)
- except xRocketAPIError as exc:
print(exc.status, exc.payload)
- add_note(note, /)¶
Add a note to the exception
- args¶
- with_traceback(tb, /)¶
Set self.__traceback__ to tb and return self.