Skip to content

Error code decoding - #428

Merged
chonilius merged 3 commits into
MergeFi:mainfrom
works-days-101010:error-code-decoding
Sep 29, 2026
Merged

chonilius merged 3 commits into
MergeFi:mainfrom
works-days-101010:error-code-decoding

Conversation

@Mainnet-ops

Copy link
Copy Markdown

Summary

Related issues

Changes

Closes #296
Closes #321
Closes #322
Closes #323

Test plan

  • Existing tests pass (make test)
  • New tests added for changed behaviour
  • Manually verified against a local node / testnet where applicable

Checklist

  • Branch is up to date with main
  • No debug / dead code left in
  • cargo fmt and cargo clippy are clean

“Mainnet-ops” added 3 commits September 29, 2026 10:58
- Create error-codes.mjs with mappings for escrow, milestones, and maintenance-pool contracts
- Implement extractErrorCode() to parse numeric error codes from Soroban errors
- Add decodeErrorCode() to map numeric codes to human-readable names
- Update invoke.mjs to use formatError() in catch block
- Handle ambiguous error codes (same number across different contracts)
- Fall back gracefully for non-contract errors (network/auth failures)

Fixes issue MergeFi#124 - contract errors now show named Error variants instead of opaque XDR/host error objects
- Remove duplicate parseArg function definition
- Keep the working parseArg implementation as exported function
@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

@Mainnet-ops Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chonilius
chonilius merged commit 2c961ad into MergeFi:main Sep 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment