mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
lightningd/invoice.c: Improve programmatic error reporting for delinvoice.
Changelog-Changed: JSON-RPC: `delinvoice` will now report specific error codes: 905 for failing to find the invoice, 906 for the invoice status not matching the parameter.
This commit is contained in:
committed by
ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent
b646b96756
commit
e7d89cd7de
15
doc/lightning-delinvoice.7
generated
15
doc/lightning-delinvoice.7
generated
@@ -19,6 +19,21 @@ The caller should be particularly aware of the error case caused by the
|
||||
On success, an invoice description will be returned as per
|
||||
\fBlightning-listinvoice\fR(7)\.
|
||||
|
||||
.SH ERRORS
|
||||
|
||||
The following errors may be reported:
|
||||
|
||||
.RS
|
||||
.IP \[bu]
|
||||
-1: Database error\.
|
||||
.IP \[bu]
|
||||
905: An invoice with that label does not exist\.
|
||||
.IP \[bu]
|
||||
906: The invoice \fIstatus\fR does not match the parameter\.
|
||||
An error object will be returned as error \fIdata\fR, containing
|
||||
\fIcurrent_status\fR and \fIexpected_status\fR fields\.
|
||||
|
||||
.RE
|
||||
.SH AUTHOR
|
||||
|
||||
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
|
||||
|
||||
@@ -21,6 +21,19 @@ RETURN VALUE
|
||||
On success, an invoice description will be returned as per
|
||||
lightning-listinvoice(7).
|
||||
|
||||
ERRORS
|
||||
------
|
||||
|
||||
The following errors may be reported:
|
||||
|
||||
- -1: Database error.
|
||||
- 905: An invoice with that label does not exist.
|
||||
- 906: The invoice *status* does not match the parameter.
|
||||
An error object will be returned as error *data*, containing
|
||||
*current_status* and *expected_status* fields.
|
||||
This is most likely due to the *status* of the invoice
|
||||
changing just before this command is invoked.
|
||||
|
||||
AUTHOR
|
||||
------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user