😟API Errors and Troubleshooting

Troubleshooting the standard JSON-RPC errors.

Example Error Response

{
   "jsonrpc":"2.0",
   "id":1,
   "error":{
      "code":-32602, // this is the reference error code 
      "message":"invalid argument 0: json: cannot unmarshal hex string of odd length into Go value of type common.Address"
   }
}

A typical error message returned in JSON contains the following key fields.

  1. CODE : The JSON-RPC error code, see below for extended description.

  2. MESSAGE : An explanation of what went wrong, and how you can correct it.

JSON-RPC Error Codes

Last updated