Block not available for slot (-32004)
Last updated:
At a glance
| Property | Value |
|---|---|
| Code | -32004 |
| Message | Block not available for slot |
| Category | block |
Cause
The requested slot's block is not available on this node — it may not have been produced, may be ahead of the node's current slot, or has aged out of the node's ledger retention.
Solution
- Check the slot exists with `getBlocks` / `getBlockTime` before fetching.
- Query a node with longer ledger retention for historical slots.
- For recent slots, retry after the node catches up (compare with `getSlot`).
Example
{
"id": 1,
"error": {
"code": -32004,
"message": "Block not available for slot 123456789"
},
"jsonrpc": "2.0"
}FAQ
- Why does "Block not available for slot" happen?
- The requested slot's block is not available on this node — it may not have been produced, may be ahead of the node's current slot, or has aged out of the node's ledger retention.
- How do I fix "Block not available for slot"?
- Check the slot exists with `getBlocks` / `getBlockTime` before fetching. Query a node with longer ledger retention for historical slots. For recent slots, retry after the node catches up (compare with `getSlot`).
- What is RPC error -32004?
- -32004 means: Block not available for slot. The requested slot's block is not available on this node — it may not have been produced, may be ahead of the node's current slot, or has aged out of the node's ledger retention.