mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
doc: unify man pages error sections
Change all man pages to follow the style of doc/lightning-pay.7.md for the section on returning errors. Changelog-None
This commit is contained in:
parent
89466f0e55
commit
3cf91b23b9
6 changed files with 28 additions and 81 deletions
25
doc/lightning-disconnect.7
generated
25
doc/lightning-disconnect.7
generated
|
@ -40,30 +40,17 @@ connection\.
|
|||
|
||||
On success, an empty object is returned\.
|
||||
|
||||
.SH ERRORS
|
||||
|
||||
If \fIid\fR is invalid, an error message will be returned:
|
||||
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
|
||||
with \fBcode\fR being one of the following:
|
||||
|
||||
.nf
|
||||
.RS
|
||||
{ "code" : -1, "message" : "Peer not connected" }
|
||||
|
||||
.IP \[bu]
|
||||
-32602: If the given parameters are wrong\.
|
||||
.IP \[bu]
|
||||
-1: Catchall nonspecific error\.
|
||||
|
||||
.RE
|
||||
|
||||
.fi
|
||||
|
||||
If the peer has an active channel and \fIforce\fR is not set, an error
|
||||
message will be returned:
|
||||
|
||||
.nf
|
||||
.RS
|
||||
{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
|
||||
|
||||
|
||||
.RE
|
||||
|
||||
.fi
|
||||
.SH AUTHOR
|
||||
|
||||
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
||||
|
|
|
@ -35,17 +35,11 @@ RETURN VALUE
|
|||
|
||||
On success, an empty object is returned.
|
||||
|
||||
ERRORS
|
||||
------
|
||||
On error the returned object will contain `code` and `message` properties,
|
||||
with `code` being one of the following:
|
||||
|
||||
If *id* is invalid, an error message will be returned:
|
||||
|
||||
{ "code" : -1, "message" : "Peer not connected" }
|
||||
|
||||
If the peer has an active channel and *force* is not set, an error
|
||||
message will be returned:
|
||||
|
||||
{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
|
||||
- -32602: If the given parameters are wrong.
|
||||
- -1: Catchall nonspecific error.
|
||||
|
||||
AUTHOR
|
||||
------
|
||||
|
|
24
doc/lightning-listchannels.7
generated
24
doc/lightning-listchannels.7
generated
|
@ -32,6 +32,7 @@ list of 0 or more objects\.
|
|||
|
||||
Each object in the list contains the following data:
|
||||
|
||||
.RS
|
||||
.IP \[bu]
|
||||
\fIsource\fR : The node providing entry to the channel, specifying the
|
||||
fees charged for using the channel in that direction\.
|
||||
|
@ -79,27 +80,20 @@ through this channel\.
|
|||
\fIhtlc_maximum_msat\fR : The maximum payment which can be send
|
||||
through this channel\.
|
||||
|
||||
.RE
|
||||
|
||||
If \fIshort_channel_id\fR or \fIsource\fR is supplied and no matching channels
|
||||
are found, a "channels" object with an empty list is returned\.
|
||||
|
||||
.SH ERRORS
|
||||
|
||||
If \fIshort_channel_id\fR is not a valid short_channel_id, an error
|
||||
message will be returned:
|
||||
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
|
||||
with \fBcode\fR being one of the following:
|
||||
|
||||
.nf
|
||||
.RS
|
||||
{ "code" : -32602,
|
||||
"message" : "'short_channel_id' should be a short channel id, not '...'" }
|
||||
|
||||
.IP \[bu]
|
||||
-32602: If the given parameters are wrong\.
|
||||
|
||||
.RE
|
||||
|
||||
.fi
|
||||
|
||||
Similarly if \fIsource\fR is not a valid pubkey\.
|
||||
|
||||
.SH AUTHOR
|
||||
|
||||
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
||||
|
@ -115,6 +109,7 @@ Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
|||
|
||||
Lightning RFC site
|
||||
|
||||
.RS
|
||||
.IP \[bu]
|
||||
|
||||
BOLT #2:
|
||||
|
@ -128,7 +123,4 @@ BOLT #7:
|
|||
|
||||
|
||||
|
||||
.HL
|
||||
|
||||
Last updated 2019-06-12 11:16:20 CEST
|
||||
|
||||
.RE
|
||||
|
|
|
@ -65,16 +65,10 @@ through this channel.
|
|||
If *short\_channel\_id* or *source* is supplied and no matching channels
|
||||
are found, a "channels" object with an empty list is returned.
|
||||
|
||||
ERRORS
|
||||
------
|
||||
On error the returned object will contain `code` and `message` properties,
|
||||
with `code` being one of the following:
|
||||
|
||||
If *short\_channel\_id* is not a valid short\_channel\_id, an error
|
||||
message will be returned:
|
||||
|
||||
{ "code" : -32602,
|
||||
"message" : "'short_channel_id' should be a short channel id, not '...'" }
|
||||
|
||||
Similarly if *source* is not a valid pubkey.
|
||||
- -32602: If the given parameters are wrong.
|
||||
|
||||
AUTHOR
|
||||
------
|
||||
|
|
22
doc/lightning-listpeers.7
generated
22
doc/lightning-listpeers.7
generated
|
@ -67,29 +67,15 @@ peer at the specified \fIlevel\fR
|
|||
If \fIid\fR is supplied and no matching nodes are found, a "peers" object
|
||||
with an empty list is returned\.
|
||||
|
||||
.SH ERRORS
|
||||
|
||||
If \fIid\fR is not a valid public key, an error message will be returned:
|
||||
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
|
||||
with \fBcode\fR being one of the following:
|
||||
|
||||
.nf
|
||||
.RS
|
||||
{ "code" : -32602, "message" : "'id' should be a pubkey, not '...'" }
|
||||
|
||||
.IP \[bu]
|
||||
-32602: If the given parameters are wrong\.
|
||||
|
||||
.RE
|
||||
|
||||
.fi
|
||||
|
||||
If \fIlevel\fR is not a valid log level, an error message will be returned:
|
||||
|
||||
.nf
|
||||
.RS
|
||||
{ "code" : -32602, "message" : "'level' should be 'io', 'debug', 'info', or 'unusual', not '...'" }
|
||||
|
||||
|
||||
.RE
|
||||
|
||||
.fi
|
||||
.SH AUTHOR
|
||||
|
||||
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
||||
|
|
|
@ -53,16 +53,10 @@ peer at the specified *level*
|
|||
If *id* is supplied and no matching nodes are found, a "peers" object
|
||||
with an empty list is returned.
|
||||
|
||||
ERRORS
|
||||
------
|
||||
On error the returned object will contain `code` and `message` properties,
|
||||
with `code` being one of the following:
|
||||
|
||||
If *id* is not a valid public key, an error message will be returned:
|
||||
|
||||
{ "code" : -32602, "message" : "'id' should be a pubkey, not '...'" }
|
||||
|
||||
If *level* is not a valid log level, an error message will be returned:
|
||||
|
||||
{ "code" : -32602, "message" : "'level' should be 'io', 'debug', 'info', or 'unusual', not '...'" }
|
||||
- -32602: If the given parameters are wrong.
|
||||
|
||||
AUTHOR
|
||||
------
|
||||
|
|
Loading…
Add table
Reference in a new issue