Error Structure
Standard JSON-RPC 2.0 Error Codes
Defined by JSON-RPC 2.0 specification:| Code | Constant | Description |
|---|---|---|
-32700 | PARSE_ERROR | Invalid JSON received by server |
-32600 | INVALID_REQUEST | JSON is not a valid request object |
-32601 | METHOD_NOT_FOUND | Method does not exist or is not available |
-32602 | INVALID_PARAMS | Invalid method parameter(s) |
-32603 | INTERNAL_ERROR | Internal JSON-RPC error |
Ethereum-Specific Error Codes (EIP-1474)
Defined by EIP-1474 in the-32000 to -32099 range:
| Code | Constant | Description |
|---|---|---|
-32000 | INVALID_INPUT | Missing or invalid parameters (commonly “execution reverted”) |
-32001 | RESOURCE_NOT_FOUND | Requested resource not found (block, transaction, etc.) |
-32002 | RESOURCE_UNAVAILABLE | Requested resource not available (node syncing, data not ready) |
-32003 | TRANSACTION_REJECTED | Transaction creation failed |
-32004 | METHOD_NOT_SUPPORTED | Method exists but is not implemented |
-32005 | LIMIT_EXCEEDED | Request exceeds defined limit |
-32006 | JSON_RPC_VERSION_NOT_SUPPORTED | JSON-RPC protocol version not supported |
Using Error Codes
Execution Reverted Errors
The-32000 (INVALID_INPUT) error code is most commonly used for contract execution failures:
Retry Strategies
Smart Retry with Error Code Filtering
Only retry on transient errors (not permanent failures):Rate Limit Handling
Complete Error Reference
See@tevm/voltaire/JsonRpcError for:
- All error code constants
JsonRpcError.from()constructorERROR_MESSAGESlookup table
Related
- Method API - Method calls and responses
- Performance - Optimization strategies

