Registry Mirror
Skip to content

lightning-liquidity: Introduce better error types #4074

Open

Description

@tnull

In lightning-liqudity we historically at some point went with reusing LDK's APIError type, which was a weird choice even back then.

However, we since added a bunch of additional error cases, and at the very least since #4008 (where we had to use APIError for inline persistence errors), APIError makes no sense anymore.

We should introduce a dedicated error type with clearly documented variants for lightning-liquidity and use it throughout the LSPS1/2/5 APIs.

Activity

  1. added this to the 0.3 milestone on Oct 16, 2025
  2. tnull commented on Oct 16, 2025

    @tnull
    ContributorAuthor

    Post-#4160 we should def. also create a separate error variant for 'HTLC intercepted failed due to unknown SCID'.

  3. f3r10 commented on Oct 31, 2025

    @f3r10
    Contributor

    Hi @tnull @martinsaposnic could I give it a try at this issue?

  4. tnull commented on Nov 3, 2025

    @tnull
    ContributorAuthor

    Hi @tnull @martinsaposnic could I give it a try at this issue?

    Thanks for showing interest here! While the actual code changes should be trivial, this would be a rather substantial refactor in terms of API design. As it will require a bunch of context (esp about the shortcomings we found in our current design), it's probably no 'good first issue'.

  5. f3r10 commented on Nov 4, 2025

    @f3r10
    Contributor

    Oh ok @tnull, thanks for the advice. I am going to look for a 'good first issue'

  6. modified the milestones: 0.3, 0.4 on Mar 4, 2026
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions