Skip to content

S3 - HTTP backend client: request timeout, retry, and abort support #3

Description

@davedumto

Summary

The HTTP backend client has no timeout handling, so a slow or hung gateway can hang the calling application indefinitely. Add configurable timeout, limited retry for idempotent reads, and abort support.

Context

The HTTP backend client wraps the wallet gateway routes. It currently issues fetch calls with no time bound and no cancellation.

Requirements

  • Add a configurable per-request timeout with a sensible default. On timeout, reject with a typed error rather than hanging.
  • Support an AbortSignal so callers can cancel in flight requests.
  • Add limited retry with backoff for safe, idempotent read operations only. Never retry a submission or any state-changing call.
  • Make timeout and retry counts configurable through the client options, with defaults that are safe for a browser.
  • Tests covering: a slow response triggers the timeout error, an abort signal cancels the request, a read retries then succeeds, and a submission is never retried.

Before you start

Read the contributing guide first: https://github.com/Vellar-Wallet/vellar-sdk/blob/main/CONTRIBUTING.md

Key rules:

  • Fork the repo and work from your fork. Never push to this repository directly.
  • All pull requests must target the drips branch, never main. PRs opened against main are closed automatically.
  • Only work on issues assigned to you. Comment on this issue to request assignment and wait before starting.

Run these locally before opening a PR (CI runs the same checks):

npm install
npm run typecheck
npm test
npm run build

New code is expected to come with tests.

Questions go to the Telegram group, not new issues: https://t.me/+RWPCKXXJTj45Njk0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions