Skip to content

Consolidated error-code catalog (stellar/ERRORS.md) #168

Description

@truthixify

Tier: S (1-2 days) | Type: dx + docs

Context. Every Stellar contract with a rich contracterror enum (stealth-sender, stealth-registry, wraith-names, stealth-vault, stealth-splitter) assigns numeric codes independently. wraith-names uses codes 1 to 32 for its main enum and 100+ for AuctionError specifically to stay disjoint. There is no single-page catalog SDK authors can grep to map a returned code back to a source, so integration teams keep re-deriving it from Rust source. stealth-batch-sender and wraith-asset-policy are still panic-only today (issue #1 fixes batch-sender), so the catalog also serves as a coverage tracker.

Scope.

  • New stellar/ERRORS.md listing every code in every contract, one table per crate: Code | Name | Meaning | Introduced in.
  • Cross-reference each row to the line in source where the variant is defined.
  • Add a "Code allocation policy" section reserving disjoint ranges per contract to prevent future collisions.
  • Add a CI check under .github/workflows/ci.yml that greps contracterror enums in source and fails if any variant is missing from ERRORS.md.

Acceptance.

  • Every contracterror variant across every crate is present in stellar/ERRORS.md
  • CI check fails a PR that adds a new variant without updating the doc
  • Code allocation policy section documents the reserved range per contract
  • Linked from stellar/README.md and from each contract's README

Files. stellar/ERRORS.md (new), .github/workflows/ci.yml, stellar/README.md, stellar/contracts/*/README.md, stellar/*/README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programdocsDocumentationdripsFunded via Drips NetworkdxDeveloper experiencehelp wantedExtra attention is neededstellarTouches Stellar / Soroban codestellar-waveAuto-created for Wave 8wave-8Auto-created for Wave 8

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions