From 3f359c0464566896022b0ae0e50eef583284dab6 Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Fri, 11 Sep 2026 10:52:27 +0200 Subject: [PATCH] docs: document missing and fix erroneous JSON-RPC error codes Audit the `errors` sections of the RPC schemas against the error codes the handlers actually raise, and fix the discrepancies. FUNDING_STILL_SYNCING_BITCOIN (304) is only raised by `fundpsbt` and `utxopsbt` (wallet/reservation.c), and is forwarded verbatim by every other command which can return it. Document it on `fundpsbt`, `utxopsbt`, `txprepare`, `withdraw`, `multiwithdraw`, `upgradewallet`, `fundchannel` and `multifundchannel`. Conversely, `fundchannel_start` and `openchannel_init` do not call either: when the node is not synced they delay via topology_add_sync_waiter() and retry, so drop their stale 304. Also fix the remaining discrepancies: - `delpay` documented 211 for a status mismatch, but that path returns 208 (PAY_NO_SUCH_PAYMENT); 211 is never raised by `delpay`, so replace it; - document missing codes: `createinvoice` 907 (INVOICE_OFFER_INACTIVE), `enableoffer` 1007 (OFFER_USED_SINGLE_USE), `getroutes` 217 (PAY_USER_ERROR) and `addpsbtoutput` 302/309; - add `errors` sections to `splice_init`, `splice_update` and `splice_signed` (351-356), `disableoffer` and `disableinvoicerequest` (1001), `preapproveinvoice` (213), `preapprovekeysend` (214) and `recover` (1600). The splice commands can also fail asynchronously, after the command has gone pending, through the channeld message handlers in channel_control.c which resolve the pending command via splice_command_for_chan(). Document those codes too: 350 (SPLICE_BROADCAST_FAIL) on `splice_signed`; 357/359/360 (SPLICE_FUNDING_LOW/SPLICE_LOW_FEE/SPLICE_HIGH_FEE) on `splice_update`; and 358/362/363 (SPLICE_STATE_ERROR/SPLICE_ABORT/ SPLICE_CHANNEL_ERROR) on all three. Changelog-None --- contrib/msggen/msggen/schema.json | 108 +++++++++++++++++++++++-- doc/schemas/addpsbtoutput.json | 8 ++ doc/schemas/createinvoice.json | 3 +- doc/schemas/delpay.json | 3 +- doc/schemas/disableinvoicerequest.json | 6 ++ doc/schemas/disableoffer.json | 6 ++ doc/schemas/enableoffer.json | 3 +- doc/schemas/fundchannel.json | 1 + doc/schemas/fundchannel_start.json | 1 - doc/schemas/fundpsbt.json | 1 + doc/schemas/getroutes.json | 1 + doc/schemas/multifundchannel.json | 1 + doc/schemas/multiwithdraw.json | 1 + doc/schemas/openchannel_init.json | 1 - doc/schemas/preapproveinvoice.json | 6 ++ doc/schemas/preapprovekeysend.json | 6 ++ doc/schemas/recover.json | 7 ++ doc/schemas/splice_init.json | 15 ++++ doc/schemas/splice_signed.json | 16 ++++ doc/schemas/splice_update.json | 18 +++++ doc/schemas/txprepare.json | 1 + doc/schemas/upgradewallet.json | 1 + doc/schemas/utxopsbt.json | 1 + doc/schemas/withdraw.json | 1 + 24 files changed, 204 insertions(+), 12 deletions(-) diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json index 6219f03f96e2..18a287d9e45a 100644 --- a/contrib/msggen/msggen/schema.json +++ b/contrib/msggen/msggen/schema.json @@ -133,6 +133,14 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 302: The output amount is below the dust limit.", + "- 309: The given PSBT is invalid or could not be modified." + ], "author": [ "Dusty [@dusty_daemon](mailto:@dustydaemon) is mainly responsible." ], @@ -7532,7 +7540,8 @@ "The following error codes may occur:", "", "- -1: Catchall nonspecific error.", - "- 900: An invoice with the given *label* already exists." + "- 900: An invoice with the given *label* already exists.", + "- 907: The offer associated with the invoice is not active." ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." @@ -12643,8 +12652,7 @@ "The following error codes may occur:", "", "- -32602: Parameter missed or malformed;", - "- 211: Payment status mismatch. Check the correct status via **paystatus**;", - "- 208: Payment with payment_hash not found." + "- 208: Payment with payment_hash not found, or without the given status (and partid/groupid)." ], "author": [ "Vincenzo Palazzo [vincenzo.palazzo@protonmail.com](mailto:vincenzo.palazzo@protonmail.com) is mainly responsible." @@ -13456,6 +13464,12 @@ "Note: the returned object is the same format as **listinvoicerequests**." ] }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 1001: invoice_request is already disabled." + ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." ], @@ -13578,6 +13592,12 @@ "Note: the returned object is the same format as **listoffers**." ] }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 1001: offer is already disabled." + ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." ], @@ -13847,7 +13867,8 @@ "On failure, one of the following error codes may be returned:", "", "- -32602: Error in given parameters.", - "- 1006: offer already enabled." + "- 1006: offer already enabled.", + "- 1007: offer is single-use and has already been used." ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." @@ -15022,6 +15043,7 @@ "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The output amount is too small, and would be considered dust.", "- 303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels).", "", "Failure may also occur if **lightningd** and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.)." @@ -15498,7 +15520,6 @@ "- -1: Catchall nonspecific error.", "- 300: The amount exceeded the maximum configured funding amount.", "- 301: The provided `push_msat` is greater than the provided `amount`.", - "- 304: Still syncing with bitcoin network", "- 305: Peer is not connected.", "- 306: Unknown peer id.", "- 312: Peer negotiated `option_dual_fund`, must use `openchannel_init` not `fundchannel_start`. (Only if ``experimental-dual-fund` is enabled)" @@ -16103,6 +16124,7 @@ "- -32602: If the given parameters are wrong.", "- -1: Catchall nonspecific error.", "- 301: Insufficient UTXOs to meet *satoshi* value.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels)." ], "author": [ @@ -17463,6 +17485,7 @@ "- 205: Unable to find a route.", "- 206: Route too expensive. Either the max_delay or maxfee_msat was exceeded.", "- 215: We don't have enough funds in all our channels to pay this.", + "- 217: The given *maxdelay* is larger than the maximum allowed.", "- 220: We can't find sufficient capacity into the destination." ], "author": [ @@ -30713,6 +30736,7 @@ "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The output amount is too small, and would be considered dust.", "- 303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels).", "", "Failure may also occur if **lightningd** and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.). See lightning-fundchannel_start(7) and lightning-fundchannel_complete(7).", @@ -30959,6 +30983,7 @@ "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The dust limit is not met.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "author": [ @@ -32026,7 +32051,6 @@ "- -1: Catchall nonspecific error.", "- 300: The amount exceeded the maximum configured funding amount.", "- 301: The provided PSBT cannot afford the funding amount.", - "- 304: Still syncing with bitcoin network", "- 305: Peer is not connected.", "- 306: Unknown peer id.", "- 309: PSBT missing required fields", @@ -33491,6 +33515,12 @@ "additionalProperties": false, "properties": {} }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 213: The invoice was not preapproved." + ], "author": [ "Ken Sedgwick [ken@bonsai.com](mailto:ken@bonsai.com) is mainly responsible." ], @@ -33577,6 +33607,12 @@ "additionalProperties": false, "properties": {} }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 214: The keysend payment was not preapproved." + ], "author": [ "Ken Sedgwick [ken@bonsai.com](mailto:ken@bonsai.com) is mainly responsible." ], @@ -33849,6 +33885,13 @@ } } }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- -1: Catchall nonspecific error.", + "- 1600: The node is not empty, or recovery is already in progress." + ], "author": [ "Rusty Russell [rusty@blockstream.com](mailto:rusty@blockstream.com) is mainly responsible." ], @@ -37356,6 +37399,21 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 351: The channel is not owned by this node, or its owner is in an abnormal state.", + "- 352: Unknown channel.", + "- 353: The channel is not in a state which permits splicing.", + "- 354: The peer does not support splicing.", + "- 355: Another splice command is already in progress for this channel.", + "- 356: The splice PSBT is invalid.", + "- 358: The channel is not in a valid state to perform the requested splice operation.", + "- 362: The splice was aborted.", + "- 363: The channel was disconnected during the splice command." + ], "usage": [ "Here is an example set of splice commands that will splice in 100,000 sats to the first channel that comes out of `listpeerchannels`.", "", @@ -37506,6 +37564,22 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 350: The splice transaction could not be broadcast.", + "- 351: The channel is not owned by this node, or its owner is in an abnormal state.", + "- 352: Unknown channel.", + "- 353: The channel is not in a state which permits splicing.", + "- 354: The peer does not support splicing.", + "- 355: Another splice command is already in progress for this channel.", + "- 356: The splice PSBT is invalid.", + "- 358: The channel is not in a valid state to perform the requested splice operation.", + "- 362: The splice was aborted.", + "- 363: The channel was disconnected during the splice command." + ], "usage": [ "In this example we funded the psbt from our lightning node, so we can use the lightning node to sign for its funds.", "", @@ -37667,6 +37741,24 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 351: The channel is not owned by this node, or its owner is in an abnormal state.", + "- 352: Unknown channel.", + "- 353: The channel is not in a state which permits splicing.", + "- 354: The peer does not support splicing.", + "- 355: Another splice command is already in progress for this channel.", + "- 356: The splice PSBT is invalid.", + "- 357: The amount of funds provided for the splice was lower than the amount committed to the peer.", + "- 358: The channel is not in a valid state to perform the requested splice operation.", + "- 359: The splice feerate is lower than the minimum required.", + "- 360: The splice feerate is higher than the configured maximum (use `force_feerate` to override).", + "- 362: The splice was aborted.", + "- 363: The channel was disconnected during the splice command." + ], "usage": [ "Here is an example way to call `splice_update`", "", @@ -38503,6 +38595,7 @@ "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The dust limit is not met.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "author": [ @@ -38880,6 +38973,7 @@ "", "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "usage": [ @@ -39118,6 +39212,7 @@ "- -32602: If the given parameters are wrong.", "- -1: Catchall nonspecific error.", "- 301: Insufficient UTXOs to meet *satoshi* value.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels)." ], "author": [ @@ -41010,6 +41105,7 @@ "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The dust limit is not met.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "author": [ diff --git a/doc/schemas/addpsbtoutput.json b/doc/schemas/addpsbtoutput.json index db5eb9501fa1..c10da7ccc3ba 100644 --- a/doc/schemas/addpsbtoutput.json +++ b/doc/schemas/addpsbtoutput.json @@ -69,6 +69,14 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 302: The output amount is below the dust limit.", + "- 309: The given PSBT is invalid or could not be modified." + ], "author": [ "Dusty [@dusty_daemon](mailto:@dustydaemon) is mainly responsible." ], diff --git a/doc/schemas/createinvoice.json b/doc/schemas/createinvoice.json index 8d85dd99a76c..a490c490851f 100644 --- a/doc/schemas/createinvoice.json +++ b/doc/schemas/createinvoice.json @@ -188,7 +188,8 @@ "The following error codes may occur:", "", "- -1: Catchall nonspecific error.", - "- 900: An invoice with the given *label* already exists." + "- 900: An invoice with the given *label* already exists.", + "- 907: The offer associated with the invoice is not active." ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." diff --git a/doc/schemas/delpay.json b/doc/schemas/delpay.json index 1513bd8aa1ec..8747be5aac11 100644 --- a/doc/schemas/delpay.json +++ b/doc/schemas/delpay.json @@ -194,8 +194,7 @@ "The following error codes may occur:", "", "- -32602: Parameter missed or malformed;", - "- 211: Payment status mismatch. Check the correct status via **paystatus**;", - "- 208: Payment with payment_hash not found." + "- 208: Payment with payment_hash not found, or without the given status (and partid/groupid)." ], "author": [ "Vincenzo Palazzo [vincenzo.palazzo@protonmail.com](mailto:vincenzo.palazzo@protonmail.com) is mainly responsible." diff --git a/doc/schemas/disableinvoicerequest.json b/doc/schemas/disableinvoicerequest.json index 8fa41d3e3834..0c35cad5f0bf 100644 --- a/doc/schemas/disableinvoicerequest.json +++ b/doc/schemas/disableinvoicerequest.json @@ -77,6 +77,12 @@ "Note: the returned object is the same format as **listinvoicerequests**." ] }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 1001: invoice_request is already disabled." + ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." ], diff --git a/doc/schemas/disableoffer.json b/doc/schemas/disableoffer.json index 59a834a1b874..0185ad9fa465 100644 --- a/doc/schemas/disableoffer.json +++ b/doc/schemas/disableoffer.json @@ -91,6 +91,12 @@ "Note: the returned object is the same format as **listoffers**." ] }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 1001: offer is already disabled." + ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." ], diff --git a/doc/schemas/enableoffer.json b/doc/schemas/enableoffer.json index 1723e05ed30d..6e4bbf26e8a6 100644 --- a/doc/schemas/enableoffer.json +++ b/doc/schemas/enableoffer.json @@ -94,7 +94,8 @@ "On failure, one of the following error codes may be returned:", "", "- -32602: Error in given parameters.", - "- 1006: offer already enabled." + "- 1006: offer already enabled.", + "- 1007: offer is single-use and has already been used." ], "author": [ "Rusty Russell [rusty@rustcorp.com.au](mailto:rusty@rustcorp.com.au) is mainly responsible." diff --git a/doc/schemas/fundchannel.json b/doc/schemas/fundchannel.json index 6f7cfacf77f9..708e78130452 100644 --- a/doc/schemas/fundchannel.json +++ b/doc/schemas/fundchannel.json @@ -223,6 +223,7 @@ "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The output amount is too small, and would be considered dust.", "- 303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels).", "", "Failure may also occur if **lightningd** and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.)." diff --git a/doc/schemas/fundchannel_start.json b/doc/schemas/fundchannel_start.json index b8e5d5b401fd..9ec6b72d12dd 100644 --- a/doc/schemas/fundchannel_start.json +++ b/doc/schemas/fundchannel_start.json @@ -184,7 +184,6 @@ "- -1: Catchall nonspecific error.", "- 300: The amount exceeded the maximum configured funding amount.", "- 301: The provided `push_msat` is greater than the provided `amount`.", - "- 304: Still syncing with bitcoin network", "- 305: Peer is not connected.", "- 306: Unknown peer id.", "- 312: Peer negotiated `option_dual_fund`, must use `openchannel_init` not `fundchannel_start`. (Only if ``experimental-dual-fund` is enabled)" diff --git a/doc/schemas/fundpsbt.json b/doc/schemas/fundpsbt.json index 4dc53b1f1960..ab6622aa4fa5 100644 --- a/doc/schemas/fundpsbt.json +++ b/doc/schemas/fundpsbt.json @@ -195,6 +195,7 @@ "- -32602: If the given parameters are wrong.", "- -1: Catchall nonspecific error.", "- 301: Insufficient UTXOs to meet *satoshi* value.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels)." ], "author": [ diff --git a/doc/schemas/getroutes.json b/doc/schemas/getroutes.json index bb9c18331e5b..a386cd9a862f 100644 --- a/doc/schemas/getroutes.json +++ b/doc/schemas/getroutes.json @@ -238,6 +238,7 @@ "- 205: Unable to find a route.", "- 206: Route too expensive. Either the max_delay or maxfee_msat was exceeded.", "- 215: We don't have enough funds in all our channels to pay this.", + "- 217: The given *maxdelay* is larger than the maximum allowed.", "- 220: We can't find sufficient capacity into the destination." ], "author": [ diff --git a/doc/schemas/multifundchannel.json b/doc/schemas/multifundchannel.json index bcb77624f7b4..9383974e7099 100644 --- a/doc/schemas/multifundchannel.json +++ b/doc/schemas/multifundchannel.json @@ -314,6 +314,7 @@ "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The output amount is too small, and would be considered dust.", "- 303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels).", "", "Failure may also occur if **lightningd** and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.). See lightning-fundchannel_start(7) and lightning-fundchannel_complete(7).", diff --git a/doc/schemas/multiwithdraw.json b/doc/schemas/multiwithdraw.json index e7185a7e7da4..1c154c25aa6b 100644 --- a/doc/schemas/multiwithdraw.json +++ b/doc/schemas/multiwithdraw.json @@ -73,6 +73,7 @@ "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The dust limit is not met.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "author": [ diff --git a/doc/schemas/openchannel_init.json b/doc/schemas/openchannel_init.json index a3494c16843c..04a5671f43dd 100644 --- a/doc/schemas/openchannel_init.json +++ b/doc/schemas/openchannel_init.json @@ -189,7 +189,6 @@ "- -1: Catchall nonspecific error.", "- 300: The amount exceeded the maximum configured funding amount.", "- 301: The provided PSBT cannot afford the funding amount.", - "- 304: Still syncing with bitcoin network", "- 305: Peer is not connected.", "- 306: Unknown peer id.", "- 309: PSBT missing required fields", diff --git a/doc/schemas/preapproveinvoice.json b/doc/schemas/preapproveinvoice.json index 36e9c484c592..bd7e63f176e1 100644 --- a/doc/schemas/preapproveinvoice.json +++ b/doc/schemas/preapproveinvoice.json @@ -34,6 +34,12 @@ "additionalProperties": false, "properties": {} }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 213: The invoice was not preapproved." + ], "author": [ "Ken Sedgwick [ken@bonsai.com](mailto:ken@bonsai.com) is mainly responsible." ], diff --git a/doc/schemas/preapprovekeysend.json b/doc/schemas/preapprovekeysend.json index 4cb71094abbd..10018232c0c8 100644 --- a/doc/schemas/preapprovekeysend.json +++ b/doc/schemas/preapprovekeysend.json @@ -52,6 +52,12 @@ "additionalProperties": false, "properties": {} }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- 214: The keysend payment was not preapproved." + ], "author": [ "Ken Sedgwick [ken@bonsai.com](mailto:ken@bonsai.com) is mainly responsible." ], diff --git a/doc/schemas/recover.json b/doc/schemas/recover.json index 70cb21af72a5..f77bd0b5ce5d 100644 --- a/doc/schemas/recover.json +++ b/doc/schemas/recover.json @@ -41,6 +41,13 @@ } } }, + "errors": [ + "On failure, one of the following error codes may be returned:", + "", + "- -32602: Error in given parameters.", + "- -1: Catchall nonspecific error.", + "- 1600: The node is not empty, or recovery is already in progress." + ], "author": [ "Rusty Russell [rusty@blockstream.com](mailto:rusty@blockstream.com) is mainly responsible." ], diff --git a/doc/schemas/splice_init.json b/doc/schemas/splice_init.json index 07c9de181a50..41cbc05842ab 100644 --- a/doc/schemas/splice_init.json +++ b/doc/schemas/splice_init.json @@ -63,6 +63,21 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 351: The channel is not owned by this node, or its owner is in an abnormal state.", + "- 352: Unknown channel.", + "- 353: The channel is not in a state which permits splicing.", + "- 354: The peer does not support splicing.", + "- 355: Another splice command is already in progress for this channel.", + "- 356: The splice PSBT is invalid.", + "- 358: The channel is not in a valid state to perform the requested splice operation.", + "- 362: The splice was aborted.", + "- 363: The channel was disconnected during the splice command." + ], "usage": [ "Here is an example set of splice commands that will splice in 100,000 sats to the first channel that comes out of `listpeerchannels`.", "", diff --git a/doc/schemas/splice_signed.json b/doc/schemas/splice_signed.json index ba487442a749..f51e811ecc6a 100644 --- a/doc/schemas/splice_signed.json +++ b/doc/schemas/splice_signed.json @@ -71,6 +71,22 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 350: The splice transaction could not be broadcast.", + "- 351: The channel is not owned by this node, or its owner is in an abnormal state.", + "- 352: Unknown channel.", + "- 353: The channel is not in a state which permits splicing.", + "- 354: The peer does not support splicing.", + "- 355: Another splice command is already in progress for this channel.", + "- 356: The splice PSBT is invalid.", + "- 358: The channel is not in a valid state to perform the requested splice operation.", + "- 362: The splice was aborted.", + "- 363: The channel was disconnected during the splice command." + ], "usage": [ "In this example we funded the psbt from our lightning node, so we can use the lightning node to sign for its funds.", "", diff --git a/doc/schemas/splice_update.json b/doc/schemas/splice_update.json index 73cfe33baf3a..58b4c1ce57dc 100644 --- a/doc/schemas/splice_update.json +++ b/doc/schemas/splice_update.json @@ -65,6 +65,24 @@ } } }, + "errors": [ + "On error the returned object will contain `code` and `message` properties, with `code` being one of the following:", + "", + "- -32602: If the given parameters are wrong.", + "- -1: Catchall nonspecific error.", + "- 351: The channel is not owned by this node, or its owner is in an abnormal state.", + "- 352: Unknown channel.", + "- 353: The channel is not in a state which permits splicing.", + "- 354: The peer does not support splicing.", + "- 355: Another splice command is already in progress for this channel.", + "- 356: The splice PSBT is invalid.", + "- 357: The amount of funds provided for the splice was lower than the amount committed to the peer.", + "- 358: The channel is not in a valid state to perform the requested splice operation.", + "- 359: The splice feerate is lower than the minimum required.", + "- 360: The splice feerate is higher than the configured maximum (use `force_feerate` to override).", + "- 362: The splice was aborted.", + "- 363: The channel was disconnected during the splice command." + ], "usage": [ "Here is an example way to call `splice_update`", "", diff --git a/doc/schemas/txprepare.json b/doc/schemas/txprepare.json index ef7f162ae7c7..2a7d90393aa9 100644 --- a/doc/schemas/txprepare.json +++ b/doc/schemas/txprepare.json @@ -82,6 +82,7 @@ "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The dust limit is not met.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "author": [ diff --git a/doc/schemas/upgradewallet.json b/doc/schemas/upgradewallet.json index 98fbcf44edb2..f5240e0209fa 100644 --- a/doc/schemas/upgradewallet.json +++ b/doc/schemas/upgradewallet.json @@ -68,6 +68,7 @@ "", "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "usage": [ diff --git a/doc/schemas/utxopsbt.json b/doc/schemas/utxopsbt.json index 31d052f43691..f6bc51d5498b 100644 --- a/doc/schemas/utxopsbt.json +++ b/doc/schemas/utxopsbt.json @@ -192,6 +192,7 @@ "- -32602: If the given parameters are wrong.", "- -1: Catchall nonspecific error.", "- 301: Insufficient UTXOs to meet *satoshi* value.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have or are opening anchor channels)." ], "author": [ diff --git a/doc/schemas/withdraw.json b/doc/schemas/withdraw.json index 84e0fcfe2212..363dde837cb6 100644 --- a/doc/schemas/withdraw.json +++ b/doc/schemas/withdraw.json @@ -84,6 +84,7 @@ "- -1: Catchall nonspecific error.", "- 301: There are not enough funds in the internal wallet (including fees) to create the transaction.", "- 302: The dust limit is not met.", + "- 304: Still syncing with bitcoin network.", "- 313: The `min-emergency-msat` reserve could not be preserved (and we have anchor channels)." ], "author": [