Description
Description
When I fetch the slot data of a missed slot with eth/v2/beacon/blocks
and eth/v1/beacon/headers
, the response is 404 Not Found
, instead of a specific error indicating this is a missed block, which makes it difficult to differentiate the following 2 cases:
- Cannot fetch slot data because it's a missed slot.
- Cannot fetch slot data because nodes are out of sync, or the slot hasn't been proposed yet.
Wondering should client return a specific error for missed slot?
Version
Lighthouse/v4.5.0-441fc16/x86_64-linux
Present Behaviour
When fetching the slot data of a missed slot with eth/v2/beacon/blocks
and eth/v1/beacon/headers
, the response is 404 Not Found
.
For example, when fetch block header for https://holesky.beaconcha.in/slot/1, the response is
{ "code": 404, "message": "NOT_FOUND: beacon block at slot 1", "stacktraces": [] }
Expected Behaviour
Should client return a specific error/error code for missed slots?
Steps to resolve
Please describe the steps required to resolve this issue, if known.