Skip to content

fix: distinguish Horizon account lookup failures - #922

Merged
Topmatrixmor2014 merged 1 commit into
FinChippay:mainfrom
ayaanoncrypto:fix/913-horizon-error-classification
Aug 26, 2026
Merged

fix: distinguish Horizon account lookup failures#922
Topmatrixmor2014 merged 1 commit into
FinChippay:mainfrom
ayaanoncrypto:fix/913-horizon-error-classification

Conversation

@ayaanoncrypto

Copy link
Copy Markdown
Contributor

Summary

Fixes #913

The destination-account check in buildPaymentTransaction now distinguishes an account that does not exist from a transient Horizon failure.

Changes

  • Treat Horizon 404 responses and not_found problem types as an unfunded destination.
    • Preserve the create-account path only for genuine missing accounts.
    • Convert rate limits, 5xx responses, timeouts, and network failures into the clear retryable error Horizon unavailable, please retry.
    • Add typed error handling without changing the existing transaction construction flow.
    • Add regression coverage for nested and top-level 404 responses, not_found, transient 500 and timeout errors, retryable messaging, and cause preservation.

Testing

  • git diff --check passed.
    • Added five focused Jest regression tests.
    • Full npm test, lint, and type-check were not run because the filtered checkout has no node_modules directory.

@github-actions github-actions Bot added the needs-review PR ready for Greptile AI code review label Aug 26, 2026
@github-actions

Copy link
Copy Markdown

🤖 Greptile AI Code Review

Greptile will automatically review this PR (2 file(s) changed).

Review gates:

  • ✅ CodeQL Security Scan
  • ✅ Custom rules (.greptile/config.json)
  • ✅ Architecture guidelines (.greptile/rules.md)

To manually trigger a re-review, comment @greptileai on this PR.
To skip review, add the skip-review label.

@Topmatrixmor2014
Topmatrixmor2014 merged commit cbd79f9 into FinChippay:main Aug 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review PR ready for Greptile AI code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#122 — stellar.ts buildPaymentTransaction Treats Any loadAccount Failure as "Not Funded" (Missing Distinction for Rate-Limit/Server Errors)

2 participants