Skip to content

getLedgers returns inaccurate error message when requested ledger range outside of retention window #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sreuland opened this issue Mar 28, 2025 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers rpc-sdk-scrum

Comments

@sreuland
Copy link
Contributor

What version are you using?

22.1.x

What did you do?

requested a ledger range that was not present in the RPC's current retention window:

curl --location 'https://soroban-testnet.stellar.org' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getLedgers",
  "params": {
    "startLedger": 1000,
    "pagination": {
      "limit": 2
    }
  }
}'

What did you expect to see?

an error response which sets error.code to standardized json-rpc code for client request error, -32602 and a error.message which describes the reason, should state requested ledger range is not in retention window data range of RPC.

What did you see instead?

a generic error message stating it was due to internal aspect:

{
    "jsonrpc": "2.0",
    "id": 8675309,
    "error": {
        "code": -32003,
        "message": "[-32003] request failed to process due to internal issue"
    }
}
@sreuland sreuland added the bug Something isn't working label Mar 28, 2025
@mollykarcher mollykarcher added this to the platform sprint 58 milestone Apr 8, 2025
@mollykarcher mollykarcher added the good first issue Good for newcomers label Apr 8, 2025
@Shaptic Shaptic moved this from To Do to Needs Review in Platform Scrum Apr 15, 2025
@Shaptic Shaptic self-assigned this Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers rpc-sdk-scrum
Projects
Status: Needs Review
Development

No branches or pull requests

3 participants