Attributes#
| Attribute | Type | Description |
|---|---|---|
CODE | int = INVALID_REQUEST_ERROR_CODE |
Functions#
__init__#
__init__(message, data=None) -> None| Parameter | Type | Description |
|---|---|---|
message | str | |
data | JsonValue = None |
to_wire#
to_wire() -> JsonRpcErrorObjectReturns JsonRpcErrorObject
def to_wire(self) -> JsonRpcErrorObject:
error: JsonRpcErrorObject = {"code": self.code, "message": self.message}
if self.data is not None:
error["data"] = self.data
return error