Skip to content

Expose typed error variants for receiver errors in FFI bindings #1270

Closed as not planned

Description

@chavic

Receiver‑side errors like PayloadError, RequestError, and SessionError are not exported as typed FFI enums. Callers can’t branch on error causes, which blocks recovery logic in clients and reduces testability.

Todo:

  • Export PayloadError, RequestError, SessionError to FFI.
  • Preserve variant details (e.g., PSBT parse vs fee mismatch vs prev‑txout mismatch).
  • Add unit tests that assert specific error variants in JS/Python/Dart.
  • Update integration tests to assert typed errors on bad inputs/headers.
  • Document expected error mappings in FFI comments.

Activity

  1. changed the title [-]Missing typed receiver errors in FFI: without typed Payload/Request/Session errors, clients can’t react safely (e.g., retry vs fail) and we can’t assert the correct failure mode in tests.,[/-] [+]Expose typed error variants for receiver errors in FFI bindings[/+] on Jan 19, 2026
  2. spacebear21 commented on Apr 15, 2026

    @spacebear21
    Collaborator

    I don't think this is an issue, these internal variants are explicitly opaque. see comment here #1428 (review) and some relevant discussion here #403

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions