Skip to content

Error

Base classes

Name Children Inherits
Schema
aclientp.schema.base
Base class for generated models.

⋔ Inheritance diagram

graph TD
  95970858459616["common.Error"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970862254416 --> 95970858459616
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: Schema

JSON-RPC error object.

Represents an error that occurred during method execution, following the JSON-RPC 2.0 error object specification with optional additional data.

See protocol docs: JSON-RPC Error Object

Source code in src/aclientp/schema/common.py
class Error(Schema):
    """JSON-RPC error object.

    Represents an error that occurred during method execution, following the
    JSON-RPC 2.0 error object specification with optional additional data.

    See protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)
    """

    code: ErrorCode
    """A number indicating the error type that occurred.

    This must be an integer as defined in the JSON-RPC specification.
    """

    data: Any | None = None
    """Optional primitive or structured value that contains additional errorinformation.

    This may include debugging information or context-specific details.
    """

    message: str
    """A string providing a short description of the error.

    The message should be limited to a concise single sentence.
    """

code instance-attribute

code: ErrorCode

A number indicating the error type that occurred.

This must be an integer as defined in the JSON-RPC specification.

data class-attribute instance-attribute

data: Any | None = None

Optional primitive or structured value that contains additional errorinformation.

This may include debugging information or context-specific details.

message instance-attribute

message: str

A string providing a short description of the error.

The message should be limited to a concise single sentence.

:fa-brands-github: Show source on GitHub