Skip to main content

Casper JSON-RPC Error Codes

The following document expands on custom error codes provided by casper-json-rpc crate.

Error Codes

CodeErrorDescription
-1NoSuchDeployThe requested Deploy was not found.
-2NoSuchBlockThe requested Block was not found.
-3FailedToParseQueryKeyParsing the Key from a query failed.
-4QueryFailedThe query failed to find a result.
-5QueryFailedToExecuteExecuting the query failed.
-6FailedToParseGetBalanceURefParsing the URef while getting a balance failed.
-7FailedToGetBalanceFailed to get the requested balance.
-8GetBalanceFailedToExecuteExecuting the query to retrieve the balance failed.
-9InvalidDeployThe given Deploy cannot be executed as it is invalid.
-10NoSuchAccountThe given account was not found.
-11FailedToGetDictionaryURefFailed to get the requested dictionary URef.
-12FailedToGetTrieFailed to get the requested dictionary trie.
-13NoSuchStateRootThe requested state root hash was not found.
-32600InvalidRequestThe JSON sent is not a valid Request object.
-32601MethodNotFoundThe method does not exist or is not available.
-32602InvalidParamsInvalid method parameter(s)
-32603InternalErrorInternal JSON-RPC error.
-32700ParseErrorInvalid JSON was received by the server.

Invalid Params

The casper-json-rpc no longer ignores invalid params fields. Params fields to be omitted should be an empty Array '[]', an empty Object '{}' or absent.

Failing to adhere to this will result in an InvalidParams error.