Skip to content

add stellar error decoder - #22

Merged
JamesEjembi merged 1 commit into
Lumina-etwork:mainfrom
ZuLu0890:codex/stellar-error-decoder
Jun 16, 2026
Merged

add stellar error decoder#22
JamesEjembi merged 1 commit into
Lumina-etwork:mainfrom
ZuLu0890:codex/stellar-error-decoder

Conversation

@ZuLu0890

Copy link
Copy Markdown
Contributor

Summary

Closes #10.

Adds a reusable Stellar/Soroban error decoding layer so raw transaction and contract failures can be translated into user-facing messages with troubleshooting guidance.

What changed

  • Added src/data/errorCodes.json with typed mappings for common Stellar transaction, operation, and Soroban failure modes.
  • Added resolveError in src/utils/errorDecoder.ts to normalize Horizon/Soroban error shapes, infer contract failures, format ICU-style placeholders, and fall back to a generic decoded error.
  • Added starter consumer hooks for billing and ledger event flows.
  • Added a shared ErrorToast component with severity styling, troubleshooting expansion, and docs links.
  • Added a telemetry helper plus a Next route to capture unknown Stellar error codes for future dictionary expansion.

Impact

Users should see actionable explanations like missing signatures, underfunded operations, expired transactions, storage failures, and access violations instead of opaque SDK strings such as tx_failed, op_underfunded, or generic host exceptions.

Validation

@JamesEjembi

Copy link
Copy Markdown
Contributor

fix errors and ensure all tests are passsed

@JamesEjembi
JamesEjembi merged commit 5fd8809 into Lumina-etwork:main Jun 16, 2026
1 check failed
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.

Human-Readable Dictionary Mapping Cryptic Stellar Node Exceptions

2 participants