AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 22 Bitcoin

xpay: return the correct (documented!) error code on repeat payments.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
xpay: return the correct (documented!) error code on repeat payments.

The man page says 219, but we didn't return that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `xpay` now correctly returns error code 219 on already paid invoices (not 218).
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This is a tiny bug fix in the Core Lightning 'xpay' plugin. When a user tried to pay an invoice that had already been paid, the plugin was returning the wrong numeric error code (218 instead of the documented 219). The change makes the returned code match the documentation and the test now checks the exact code. It does not create a security vulnerability or allow anyone to steal funds; it only affects the error message details returned to API callers.

Recommended action

No security action required. Treat as a normal correctness/documentation fix. Optionally review whether other xpay error-code mappings match the man page.

Security signals we found

01

No security-relevant code path altered

02

Error-code correction only; no privilege, authentication, or payment validity change

03

Test coverage added for documented behavior

Risk score

Why this scored 22/100

Our methodology →
Potential impact 3/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 5/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.