Skip to content

sendpay_failure notifications missing important fields #7430

Closed

Description

@daywalker90

cln v24.05:
apparently some fields are missing from sendpay_failure notifications:

sendpay_failure notification: {\"sendpay_failure\":{\"code\":204,\"message\":\"failed: WIRE_UNKNOWN_NEXT_PEER (reply from remote)\",\"data\":{\"created_index\":8398,\"id\":8398,\"payment_hash\":\"a6ac55c126b415f9236526fbb6e8c847db5dc1da94db148f85db512ca3dc0c82\",\"groupid\":2,\"partid\":1,\"destination\":\"03f060953bef5b777dc77e44afa3859d022fc1a77c55138deb232ad7255e869c00\",\"amount_msat\":5311800403,\"amount_sent_msat\":5311859832,\"created_at\":1719325305,\"status\":\"pending\",\"erring_index\":1,\"failcode\":16394,\"failcodename\":\"WIRE_UNKNOWN_NEXT_PEER\",\"raw_message\":\"400a\"}}}

missing:

  • erring_node
  • erring_channel
  • erring_direction

Also notice how status is pending instead of failed as promised by the docs:

https://docs.corelightning.org/docs/event-notifications#sendpay_failure

This makes the notification far less useful and also causes a panic in cln-plugin because it expects these fields.

Activity

  1. daywalker90 commented on Jun 25, 2024

    @daywalker90
    CollaboratorAuthor

    also:

    waitsendpay a6ac55c126b415f9236526fbb6e8c847db5dc1da94db148f85db512ca3dc0c82 10 1 2
    {
       "code": 209,
       "message": "Payment failure reason unknown"
    }
    

    From the docs:
    209: The payment already failed, but the reason for failure was not stored. This should only occur when querying failed payments on very old databases.

    The payment was tried just now, so it's not old.

  2. daywalker90 commented on Jun 25, 2024

    @daywalker90
    CollaboratorAuthor

    This is not the case in all sendpay_failure notifications but it still causes cln-plugin to panic alot when theres a plugin subscribing to this notification.

  3. daywalker90 commented on Nov 4, 2026

    @daywalker90
    CollaboratorAuthor

    Fixed in 95b13b9

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions