Description: Create explicit error codes (e.g., NotAuthorized = 1, AlreadyFunded = 2) for cleaner contract failures instead of generic panics.
Requirements and context:
- Implement the trait
Into<soroban_sdk::Error>.
Suggested execution:
git checkout -b feature/contract-errors
- Build
errors.rs.
Test and commit:
feat: map generic panics to semantic error codes
Guidelines: Closes #[issue_id].
Description: Create explicit error codes (e.g.,
NotAuthorized = 1,AlreadyFunded = 2) for cleaner contract failures instead of generic panics.Requirements and context:
Into<soroban_sdk::Error>.Suggested execution:
git checkout -b feature/contract-errorserrors.rs.Test and commit:
feat: map generic panics to semantic error codesGuidelines: Closes #[issue_id].