Error¶

class Error(code: int, reason: str | None = None)[source]¶

Bases: object

A dataclass that stores information about an error that occurred.

Parameters:
  • code (int) – An identifier for the error.

  • reason (Optional[str]) – A reason for why the error arose (e.g. an exception stack-trace)

Methods

Attributes

code

Error code.

reason

Reason reported about the error.

property code: int¶

Error code.

property reason: str | None¶

Reason reported about the error.