Description
Ensure all fetch/axios (or undici) calls to Horizon and external risk providers use connect and read timeouts.
Requirements and context
- Configurable via environment.
- Surface structured errors to callers.
Suggested execution
Fork and branch
Fork the repo and create a branch:
git checkout -b chore/outbound-http-timeouts
Implement changes
- Audit
horizonListener.ts and future HTTP clients.
- Add shared
fetchWithTimeout utility under src/utils/.
Test and commit
Run tests, cover edge cases, and attach test output plus security or ops notes (auth, PII, Stellar keys) in the PR.
Run tests
Example commit message
chore(http): outbound timeouts for Horizon and integrations
Guidelines
-
Minimum 95% coverage on touched modules where applicable (npm test / coverage report).
-
Clear documentation (OpenAPI openapi.yaml, README, and inline comments for non-obvious logic).
-
Timeframe: 96 hours.
-
Run npm run build or tsc if types change.
-
Keep OpenAPI in sync with route behavior.
Description
Ensure all fetch/axios (or undici) calls to Horizon and external risk providers use connect and read timeouts.
Requirements and context
Suggested execution
Fork and branch
Fork the repo and create a branch:
Implement changes
horizonListener.tsand future HTTP clients.fetchWithTimeoututility undersrc/utils/.Test and commit
Run tests, cover edge cases, and attach test output plus security or ops notes (auth, PII, Stellar keys) in the PR.
Run tests
npm testExample commit message
Guidelines
Minimum 95% coverage on touched modules where applicable (
npm test/ coverage report).Clear documentation (OpenAPI
openapi.yaml, README, and inline comments for non-obvious logic).Timeframe: 96 hours.
Run
npm run buildortscif types change.Keep OpenAPI in sync with route behavior.