😟
API Errors and Troubleshooting
Troubleshooting the standard JSON-RPC errors.

Example Error Response

1
{
2
"jsonrpc":"2.0",
3
"id":1,
4
"error":{
5
"code":-32602, // this is the reference error code
6
"message":"invalid argument 0: json: cannot unmarshal hex string of odd length into Go value of type common.Address"
7
}
8
}
Copied!
A typical error message returned in JSON contains the following key fields.
  1. 1.
    CODE : The JSON-RPC error code, see below for extended description.
  2. 2.
    MESSAGE : An explanation of what went wrong, and how you can correct it.

JSON-RPC Error Codes

Code
Return Message
Description
-32700
Parse error
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
-32600
Invalid Request
The JSON sent is not a valid Request object.
-32601
Method not found
The method does not exist / is not available.
-32602
Invalid params
Invalid method parameter(s).
-32603
Internal error
Internal JSON-RPC error.
Last modified 5mo ago