Skip to main content

Module error

Module error 

Source
Expand description

The canonical control-plane error taxonomy.

One definition point for every error code a dig-node control method emits, the ControlError envelope ({code, message, data:{code, origin}}), and the constructor both sides use so every error carries a machine-branchable data.code (UPPER_SNAKE) and data.origin.

The numeric values are the SAME published wire contract as dig-node’s meta::ErrorCode and the canonical dig-rpc -320xx control range — they never change once assigned. A client keys its UX off data.code (the stable symbol), never the human message.

CodeVariantOriginMeaning
-32700ParseErrorshellrequest body was not valid JSON
-32600InvalidRequestshellnot a single JSON-RPC object
-32601MethodNotFoundboundarycontrol method is not resolved
-32602InvalidParamsnodemissing/malformed params
-32000DispatchFailedshellthe node failed to dispatch
-32030Unauthorizedshellcalled without a valid control token
-32031NotSupportedshellcontrol op unsupported on this build
-32032ControlErrorshellcontrol op failed at runtime
-32040WalletNoChainSourcenodeno live chain source could answer
-32041WalletNotSyncednodethe local replica is still syncing
-32042WalletReadFailednodethe read failed at the DB / chain layer
-32043WalletRateLimitednodethe open fallback rate bound is exhausted
-32044WalletNodeSpendDisablednodethe bundle spends the NODE’s own coins and live broadcast is off
-32046WalletCoinsReservednodecoins are held by an in-flight spend
-32047WalletReservationsUnavailablenodethe reservation set could not be read
-32048SpendAuditUnreadableshellthe automated-spend audit record could not be read

The -3204x block is OWNED BY THIS CRATE. A node or client MUST NOT mint a code in it that is not declared here: a privately-minted code is invisible to allocation, and two implementations then disagree about what one number means. -32044 is the worked example — it was minted in dig-node for a permanent custody refusal and, independently, here for a transient wait, so a client conflating them either retries forever on a refusal or gives up on a wait.

Structs§

ControlError
A control-plane error, serialized as the JSON-RPC error object ({code, message, data:{code, origin}}).
ControlErrorData
The machine-branchable inner data on a control error: the stable symbol + its origin.

Enums§

ControlErrorCode
A canonical control-plane error code.