You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raised when a Stellar/Horizon call fails — rejected transaction, missing trustline, insufficient balance. Should wrap the underlying stellar_sdk exception and expose the Stellar result code for programmatic handling.
Proposed Steps:
Define StellarError(ShadeError) in errors.py.
Add stellar_result_code: Optional[str] and original_error: Exception.
Catch stellar_sdk exceptions in the Stellar integration layer and re-raise as StellarError.
Acceptance Criteria:
A rejected Stellar transaction raises StellarError with the Horizon result code.
error.original_error gives access to the raw stellar_sdk exception.
A trustline-missing error surfaces as StellarError with a descriptive message.
When a Stellar or Horizon call fails, the raw stellar_sdk exception leaks out and callers have nothing stable to catch. StellarError wraps it so callers catch one SDK exception type, can read the Stellar result code to handle cases like a rejected transaction programmatically, and can still reach the original exception when they need the raw details.
What I will do
Define StellarError(ShadeError) in errors.py with stellar_result_code: Optional[str] and original_error: Exception.
In the Stellar integration layer, catch stellar_sdk exceptions and re-raise as StellarError, pulling the Horizon result code out of the response when it is present.
Give the trustline missing case a clear message, since a bare result code like op_no_trust tells a new user nothing.
Tests, one for each acceptance criterion
A rejected Stellar transaction raises StellarError carrying the Horizon result code.
error.original_error returns the raw stellar_sdk exception.
A missing trustline surfaces as StellarError with a descriptive message.
Activity
GBOYEE commentedon Jul 20, 2026
Hi — I can take this on. I can handle this one. I'll fix it and add a test to lock it down. I'll open a PR referencing this shortly once assigned.
daveades commentedon Jul 27, 2026
Hi @codebestia, I'd like to work on this issue.
How I understand it
When a Stellar or Horizon call fails, the raw stellar_sdk exception leaks out and callers have nothing stable to catch. StellarError wraps it so callers catch one SDK exception type, can read the Stellar result code to handle cases like a rejected transaction programmatically, and can still reach the original exception when they need the raw details.
What I will do
Tests, one for each acceptance criterion
I can open a PR in 1 to 2 days.
grantfox-oss commentedon Jul 27, 2026
🦊 GrantFox — @daveades has been assigned to this issue as part of the Official Campaign | FWC26 campaign!
Next steps:
Closes #35)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Jul 29, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!
@daveades's PR #54 was approved and merged by @codebestia.
🏆 @daveades: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (83 total points). Track your full progress on GrantFox.
👏 Great work, @daveades! Keep contributing to ShadeProtocol.
feat(errors): add StellarError wrapping stellar_sdk failures
Merge pull request #54 from daveades/feat/35-stellar-error