Skip to main content
When a request fails, the response body is still valid JSON-RPC: the 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 for eth_getLogs block-span rejections.
  • -32603 is used for internal router errors.
  • -32005 follows EIP-1474 (limit exceeded) for eth_getLogs query-density failures.
  • -32xxx in the -32000 range are router-specific and documented above.

eth_getLogs error messages

RouteMesh normalizes upstream eth_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:
Example (-32602, block span too large):
Example (-32005, query too dense):
If no hint is available, the message contains only the base text (no suffix).

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. For eth_getLogs, reduce toBlock - fromBlock or 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/toBlock using the hint, or tighten address/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.
When contacting support, include the X-Batch-Id response header from the failed request if you have it. See Debugging.