Skip to content

feat: configurable request timeouts for API calls#20

Merged
satoshai-dev merged 3 commits intomainfrom
feat/request-timeouts
Feb 26, 2026
Merged

feat: configurable request timeouts for API calls#20
satoshai-dev merged 3 commits intomainfrom
feat/request-timeouts

Conversation

@satoshai-dev
Copy link
Copy Markdown
Owner

Summary

  • Add requestTimeout config option (default: 30s) to prevent tests from hanging on unresponsive APIs
  • Use AbortSignal.timeout() on all fetch calls (account info, fee estimation, tx status, broadcast)
  • Timeout propagates through fee estimator, confirmation poller, and fixture helpers

Test plan

  • All existing tests pass (no regressions)
  • Typecheck passes
  • Lint passes

Closes #14

🤖 Generated with Claude Code

satoshai-dev and others added 3 commits February 26, 2026 12:54
Add requestTimeout config option (default 30s) using AbortSignal.timeout()
on all fetch calls. Prevents tests from hanging indefinitely on network issues.

Closes #14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fetchCallReadOnlyFunction from @stacks/transactions doesn't expose
an AbortSignal option, so we wrap with Promise.race to enforce the
configured requestTimeout. Closes the last timeout propagation gap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@satoshai-dev satoshai-dev merged commit af774cd into main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improvement: request timeouts for API calls

1 participant