TriportRPC

RPC error -32000: header not found

Last updated:

At a glance

Error details
PropertyValue
Applies toEthereum, Polygon, BNB Smart Chain, Base and Robinhood Chain
JSON-RPC code-32000 (upstream)
Classified asHistory boundary, not a node fault
Triport behaviourOne retry against another host before answering
BNB Smart Chain-32000 is ambiguous: missing block vs missing historical state
Robinhood ChainMeasured archive boundaries are published, not a full-history promise

Cause

Upstream nodes return -32000 'header not found' when the requested block header is absent: it is beyond the node's retained history, or the node has not yet caught up to it. Our outcome classifier treats it as a history boundary rather than a node failure, and the Robinhood router retries the read once against a different host before answering. Branch on code AND message: on BNB Smart Chain -32000 is ambiguous — 'header not found' means the block is missing, while pruned or unsupported-state wording means historical state is unavailable on the selected node.

Solution

  1. Check the block exists at the head you expect: a number above the current head arrives before the node syncs it, and a short wait resolves it.
  2. For deep history, do not assume archive depth — read the measured boundary on the network's own page instead of retrying blindly.
  3. On BSC, branch on the pair code + message: 'header not found' is a missing block, pruned or unsupported-state wording is missing state, and the two need different fallbacks.
  4. Do not treat it as an empty result: an absent header says the node cannot answer, not that the block has no content.

Example

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "header not found"
  }
}

FAQ

Is the block gone from the chain?
No. The node that served you does not have that header — because of retention or because it has not synced that far. Another node may still answer.
Why does BSC need the message as well as the code?
Its upstream uses -32000 for more than one condition. 'header not found' is a missing block; pruned or unsupported-state wording is missing state, and each needs a different fallback.