NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
371 stars 158 forks source link

Better error classification in `clients/feeder` #1888

Open ashu26jha opened 3 weeks ago

ashu26jha commented 3 weeks ago

Problem

Currently, if we try to fetch the block (lets say 1,000,000) from the feeder we get 400 Bad Request which is a generic error. Meanwhile the feeder gateway shows:

{"code": "StarknetErrorCode.BLOCK_NOT_FOUND", "message": "Block number 1000000 was not found."}

We want the error message to reflect the response.

Advantages

  1. This will help in debugging.
  2. This will be needed to improve reorg handling
ashu26jha commented 3 weeks ago

1820