Module codes

Source
Expand description

RPC Error codes and error objects

Constants§

ACCOUNT_ERROR
CALL_EXECUTION_ERROR
Call() execution error. This is clearly an application level error code, but we keep the error code to be ethereum rpc client compatible.
CONFLUX_PIVOT_CHAIN_UNSTABLE
DEPRECATED
The requested feature is deprecated.
ENCODING_ERROR
Encoding error happened in signing structured data. Related to EIP712.
EXCEPTION_ERROR
Any exception happened while processing the transaction. Mostly likely there is an internal error within the server state.
EXPERIMENTAL
The requested feature is experimental.
INCAPABLE
The node is not able to serve the request due to configuration. e.g. Not mining, light node, not archive node.
NO_PEERS
No peers are currently connected or there is insufficient amount of peers connected.
NO_TRUSTED_PEERS
No connection to trusted peers.
POS_NOT_ENABLED
PREVIOUS_REQUEST_NOT_FOUND
The error can be given to a request about a previous related request which we can not associate with.
REQUEST_REJECTED_IN_CATCH_UP
When the node is still in catch up mode, it is not capable to handle certain requests. We will return this code in this situation.
REQUEST_REJECTED_LIMIT_DATA
When the request is considered too much for the rpc function. The consideration is set individually per rpc. It can be data too large, or it can be that some performance/security related parameter is outside the accepted range.
REQUEST_REJECTED_TOO_MANY_REQUESTS
When there are too many rpc requests. We limit the number of allowed rpc requests for attack prevention.
SUSPICIOUS_MINING_RATE
The node see a suspicious total mining power or block rate. It’s likely that the node is under attack or the whole Conflux network enters an abnormal state.
UNSUPPORTED
The request is not supported (yet) at this version.