JSON-RPC 2.0 Error Codes — Standard Codes Reference
JSON-RPC 2.0 defines a small set of reserved error codes for protocol-level failures, plus a range reserved for server-defined errors. This reference lists them and what each means.
Reserved protocol errors
-32700 Parse error — the server received invalid JSON that could not be parsed. -32600 Invalid Request — the payload is valid JSON but not a valid Request object. -32601 Method not found — the requested method does not exist or is not available. -32602 Invalid params — the method exists but the parameters are wrong. -32603 Internal error — an internal JSON-RPC error on the server.
Server-defined range
Codes from -32000 to -32099 are reserved for implementation-defined server errors. Node implementations use this range for domain-specific failures such as an execution revert, an exceeded block range on eth_getLogs, or a rate or resource limit. The message and any data field carry the detail.
Error object shape
A JSON-RPC error response contains an error object with a numeric code, a short human-readable message, and an optional data field for structured detail. The result field is absent when error is present. Always branch on the presence of error rather than assuming a successful result.
Sıkça sorulanlar
What does error code -32000 mean?
-32000 falls in the server-defined range (-32000 to -32099), so its exact meaning depends on the node implementation. It commonly signals an execution error such as a revert or an exceeded query limit; read the accompanying message and data.
How do I tell a protocol error from a contract revert?
Protocol errors use the reserved codes such as -32700 through -32603 for malformed or unknown requests. A contract revert is usually surfaced through the server-defined -32000 range with a descriptive message, since the request itself was well-formed.
İlgili araçlar
Bakiye yükle, anahtarını al, yayına çık.
Self servis. Kripto ya da kartla öde. Krediyle ölçümlenir — ağır ilkel yapılar daha pahalı, basitler ucuz.
API anahtarı al