Skip to content

fix(errors): prefer Anchor named errors over stale codes - #29

Merged
signerless merged 1 commit into
mainfrom
codex/fix-anchor-error-decoding
Mar 28, 2026
Merged

fix(errors): prefer Anchor named errors over stale codes#29
signerless merged 1 commit into
mainfrom
codex/fix-anchor-error-decoding

Conversation

@signerless

@signerless signerless commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prefer decodeAnchorError to use Anchor named errors from logs and messages before stale numeric code mappings
  • keep SDK error decoding aligned with observed devnet behavior when Anchor error numbers drift
  • add regression coverage for the InsufficientStake case seen during strict devnet validation

Verification

  • npm test -- --run src/__tests__/errors.test.ts

Decode Anchor-style named errors from logs and messages before falling back to numeric code lookups.\n\nThis keeps SDK error handling aligned with observed devnet behavior when numeric mappings drift, and adds regression coverage for the InsufficientStake case seen in strict devnet validation.
@signerless
signerless merged commit 5ba123d into main Mar 28, 2026
1 check passed
@7etsuo
7etsuo deleted the codex/fix-anchor-error-decoding branch April 6, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant