[Contracts] Implement Display trait or helper string mapping for StreamError variants in test assertions
Overview
When test assertions in contracts/stream_contract/src/test.rs fail due to unexpected error codes, Soroban returns raw numeric error variants (e.g. Error(Contract, #4)), making test failures difficult to diagnose quickly.
Problem
- Developers debugging test failures must consult
errors.rsto map enum integer codes back to error names.
Proposed Changes
- Implement a helper mapping or
core::fmt::DisplayforStreamErrorin tests. - Provide human-readable assertion failure messages in test macros.
Acceptance Criteria
- [ ] Test assertion helpers print error name alongside numeric code on failure.
- [ ] No impact on compiled WASM binary size (test-only configuration).
@emmzydagreat has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Hi Maintainer, I’m ready to work on this issue after reviewing its requirements. I’ll approach the task carefully and aim to provide changes that fit well with the existing project.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @emmzydagreat to this issue.
@Rafiat30 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Can i work on this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Rafiat30 to this issue.
Congratulations, @Rafiat30! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.
🧑💻 @Rafiat30: 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 🌊
This issue has been marked as completed by a Drips Wave moderator for @Rafiat30 as part of the Stellar Wave Program's 9th Wave 🥳
Moderator's reason: [Auto-assessed] The PR is merged (mergedAt timestamp: 2026-10-06T07:00:29Z) and the changes directly implement the Display trait/helper string mapping for StreamError variants in test assertions as requested in the issue.
😎 @Rafiat30: You earned 200 Points for completing this issue! After the current Wave ends, 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.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
ℹ️ Note: This issue was marked complete via moderation. Points were issued even though the GitHub issue remains open.