result field is omitted and the error object contains a numeric code and a message. These codes are distinct from HTTP status codes (e.g. 401, 429, 504). Use the table below to interpret error.code in the response.
For a successful HTTP 200, the response may still contain a JSON-RPC error (e.g. chain not supported). Always check for the presence of error in the response body.
Code → meaning and when it occurs
Standard JSON-RPC codes
- -32700 and -32600 follow the JSON-RPC 2.0 spec for parse and invalid request errors.
- -32601 is the JSON-RPC 2.0 “Method not found” code, repurposed here to signal an empty credit balance.
- -32602 is used for invalid
chainId(invalid params) and foreth_getLogsblock-span rejections. - -32603 is used for internal router errors.
- -32005 follows EIP-1474 (limit exceeded) for
eth_getLogsquery-density failures. - -32xxx in the -32000 range are router-specific and documented above.
eth_getLogs error messages
RouteMesh normalizes upstreameth_getLogs limit errors into two client-facing shapes. Hints appear in error.message (not a separate field):
When the router can suggest a smaller span, the message includes a hint suffix:
-32602, block span too large):
-32005, query too dense):
What to do when you see an error
- -32700 / -32600: Fix the request payload (valid JSON, non-empty batch, required fields present).
- -32602: Check the URL path for a valid
chainId. Foreth_getLogs, reducetoBlock - fromBlockor split the query into smaller chunks. Use the hint suffix when present. - -32005: The block span is acceptable but the filter returned too much data. Narrow
fromBlock/toBlockusing the hint, or tightenaddress/topics. See Request behavior: eth_getLogs limits. - -32001: Use a supported chain or contact us to request support for a new chain.
- -32002: The method is not available for this chain; use a different method or chain.
- -32003: Retry after a short backoff; cooldowns are temporary. See Request behavior: Cooldowns and rate limiting for details.
- -32603 / -32000: Retry once; if it persists, contact support.
X-Batch-Id response header from the failed request if you have it. See Debugging.
