Skip to content

Refactor Stellar Horizon service layer for robust error handling and timeout management #683

Closed

Description

@Cjay-Cyber-2

Description — what to implement and the why/impact.

Interactions with Stellar Horizon can occasionally encounter network timeouts, rate limits, or ledger submission failures. This task refactors the Horizon service wrapper to handle network exceptions gracefully, implement retries for transient errors, and provide clear diagnostics for downstream callers.

Context & Requirements — background, constraints, design references, edge cases; grounded in the actual repo (real files, stack, conventions).

All Horizon I/O must remain isolated inside src/services/ as specified in the contributing guidelines. The refactor should wrap Stellar SDK calls with robust error categorization (e.g. timeout, bad request, insufficient balance).

Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".

  • Wrap Stellar Horizon calls in src/services/ with standardized error handling and retry logic.
  • Categorize Stellar error responses into actionable application errors.
  • Ensure logging captures relevant Horizon request context using Pino.
  • Add unit tests mocking Horizon responses for success, timeout, and transaction failure scenarios.

Implementation Guidance — likely files/modules to touch (use real paths from the repo context) and a suggested approach, without over-prescribing.

Inspect src/services/ for existing Stellar client initialization and transaction submission logic. Ensure strict TypeScript types are maintained.

Testing & Validation — how the contributor should prove it works (tests to add/run, manual checks, screenshots for UI).

Run npm test to execute vitest and verify all service unit tests pass successfully.

Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.


Wave complexity: Medium

Activity

  1. guptakumarranjeet150 commented on Sep 26, 2026

    @guptakumarranjeet150
    Contributor

    Hi there,

    I would love to take this on. My planned approach:

    • Implement backend logic for Refactor Stellar Horizon service layer for robust error handling and timeout management with strict schema validation and idempotent execution.
    • Verify API response schemas, authentication middleware, and database rollback safety.

    Excited to work on this—please assign to me and I will submit a clean PR shortly!

  2. guptakumarranjeet150 commented on Sep 27, 2026

    @guptakumarranjeet150
    Contributor

    Hey maintainers,

    I would love to take this on. My planned approach:

    • Implement backend logic for Refactor Stellar Horizon service layer for robust error handling and timeout management with strict schema validation and idempotent execution.
    • Verify API response schemas, authentication middleware, and database rollback safety.

    Excited to work on this—please assign to me and I will submit a clean PR shortly!

  3. olacodes-01 commented on Oct 18, 2026

    @olacodes-01

    @olacodes-01 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello Maintainer, I have reviewed this issue and I have relevant experience in solving it. Please assign to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @olacodes-01 to this issue.

  4. Hikmaholadele commented on Oct 18, 2026

    @Hikmaholadele
    Contributor

    @Hikmaholadele has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer, I’d love to work on this issue.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Hikmaholadele to this issue.

  5. drips-wave commented on Oct 18, 2026

    @drips-wave

    Congratulations, @Hikmaholadele! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @Hikmaholadele: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. grantfox-oss commented on Oct 19, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @Hikmaholadele's PR #854 was approved and merged by @Cjay-Cyber-2.

    🏆 @Hikmaholadele: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (748 total points). Track your full progress on GrantFox.

    👏 Great work, @Hikmaholadele! Keep contributing to mergepay.

  7. drips-wave commented on Oct 19, 2026

    @drips-wave

    This issue has been completed by @Hikmaholadele as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @Hikmaholadele: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions