Skip to content

stellarErrorParser: Add human-readable mappings for common Stellar error codes #702

Description

@Kingsman-99

Description

stellarErrorParser extracts error codes from Stellar transaction results but returns raw codes (e.g. "op_no_trust") without explanation. Contributors should add a mapping table that converts known Stellar operation result codes to user-friendly messages (e.g. "The recipient does not have a trustline for this asset") so error toasts are actionable.

Acceptance Criteria

  • A mapping covers at minimum 15 common Stellar operation result codes with clear English messages
  • Unknown codes fall back to a generic message: "Transaction failed: {raw code}"
  • The function returns both { code, message } so callers can use the raw code for logging
  • Existing tests continue to pass

Context

  • Target file: src/lib/stellarErrorParser.ts
  • Error display: src/lib/errors.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions