Repository navigation
Implement StellarError #35
Description
Activity
- addedGrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26
on 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 commented
on Jul 27, 2026 ContributorMore actionsHi @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
- 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.
I can open a PR in 1 to 2 days.
grantfox-oss commented
on Jul 27, 2026 grantfox-ossboton Jul 27, 2026 – with GrantFox OSSMore actionsgrantfox-oss commented
on Jul 29, 2026 grantfox-ossboton Jul 29, 2026 – with GrantFox OSSMore actions🎉 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.
- added a commit that references this issue
on Jul 29, 2026 - added a commit that references this issue
on Jul 29, 2026
Raised when a Stellar/Horizon call fails — rejected transaction, missing trustline, insufficient balance. Should wrap the underlying
stellar_sdkexception and expose the Stellar result code for programmatic handling.Proposed Steps:
StellarError(ShadeError)inerrors.py.stellar_result_code: Optional[str]andoriginal_error: Exception.stellar_sdkexceptions in the Stellar integration layer and re-raise asStellarError.Acceptance Criteria:
StellarErrorwith the Horizon result code.error.original_errorgives access to the rawstellar_sdkexception.StellarErrorwith a descriptive message.