Web3API
HomeAPI EndpointsContactTwitter
  • ​🚀 Welcome to Web3API
  • Introduction
    • ✨Getting Started
    • 📡 Choosing A Network
  • Developers
    • 🔌API Endpoints
      • eth_hashrate
      • eth_gasPrice
      • eth_blockNumber
      • eth_getBalance
      • eth_getStorageAt
      • eth_getTransactionCount
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_sendRawTransaction
      • eth_call
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getTransactionByHash
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionReceipt
      • eth_getUncleByBlockHashAndIndex
      • eth_getUncleByBlockNumberAndIndex
      • eth_getUncleCountByBlockHash
      • eth_getUncleCountByBlockNumber
      • eth_estimateGas
      • eth_syncing
    • 😟API Errors and Troubleshooting
  • Tutorials
    • ⚡Adding a Custom RPC to Metamask
  • Dashboard
    • 🔑Forgot Password
  • Resources
    • ❓ FAQ
    • 🤝 Support
Powered by GitBook
On this page
  • Example Error Response
  • JSON-RPC Error Codes

Was this helpful?

  1. Developers

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

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.

Previouseth_syncingNextAdding a Custom RPC to Metamask

Last updated 4 years ago

Was this helpful?

😟