Skip to content

Implement SDK payment error classification #442

Description

@El-swaggerito

Description

Difficulty: Expert

Type: Feature

Summary

Implement typed payment error classification for PocketPay SDK payment helpers.

Current Behaviour

Payment failures may surface as raw errors that are hard for applications to display or recover from.

Expected Behaviour

The SDK should classify validation, network, account, asset, fee, and submission failures into stable error categories.

Suggested Implementation

Create error categories, mapping utilities, payment integration, tests, fixtures, and docs.

Files or Areas Likely Affected

  • src/payments/
  • src/transactions/
  • src/errors/
  • src/diagnostics/
  • tests/
  • docs/

Acceptance Criteria

  • Payment error categories are implemented.
  • Validation, network, account, asset, fee, and submission errors are represented.
  • Payment helpers return typed errors.
  • Diagnostics avoid sensitive values.
  • Tests cover each major error category.
  • Documentation explains how apps should handle errors.

Additional Notes

This improves SDK reliability and review quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked for GrantFox OSS contributionMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Official GrantFox campaign labeldiagnosticsDiagnostics and observability workexpertExpert difficultyfeatureFeature workpaymentsPayment flow related worksdkSDK related worktransactionsTransaction related work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions