Skip to content

SC-22: Standardize error codes across all Soroban contracts #931

Description

@chinweobtagaz

Context: Currently, contracts return generic panics or inconsistent custom error types, making frontend debugging and error handling difficult.
Location: contracts/game_contract/src/error.rs
Acceptance Criteria:

  • Define a centralized #[contracterror] enum with distinct u32 values for Unauthorized, InvalidAmount, BadState, etc.
  • Replace all panic! calls with proper error returns.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions