Enum RpcErrorCode

Source
pub enum RpcErrorCode {
Show 21 variants JSONRPC2_INVALID_REQUEST = -32_600, JSONRPC2_METHOD_NOT_FOUND = -32_601, JSONRPC2_INVALID_PARAMS = -32_602, LIGHTNINGD = -1, PARAM_DEV_ERROR = -2, PAY_IN_PROGRESS = 200, PAY_RHASH_ALREADY_USED = 201, PAY_UNPARSEABLE_ONION = 202, PAY_DESTINATION_PERM_FAIL = 203, PAY_TRY_OTHER_ROUTE = 204, PAY_ROUTE_NOT_FOUND = 205, PAY_ROUTE_TOO_EXPENSIVE = 206, PAY_INVOICE_EXPIRED = 207, PAY_NO_SUCH_PAYMENT = 208, PAY_UNSPECIFIED_ERROR = 209, PAY_STOPPED_RETRYING = 210, FUND_MAX_EXCEEDED = 300, FUND_CANNOT_AFFORD = 301, FUND_OUTPUT_IS_DUST = 302, INVOICE_LABEL_ALREADY_EXISTS = 900, INVOICE_PREIMAGE_ALREADY_EXISTS = 901,
}
Expand description

Known lightningd error codes.

Keep this up to date with lightningd/jsonrpc_errors.h

Variants§

§

JSONRPC2_INVALID_REQUEST = -32_600

Invalid request

§

JSONRPC2_METHOD_NOT_FOUND = -32_601

Method not found

§

JSONRPC2_INVALID_PARAMS = -32_602

Invalid parameters

§

LIGHTNINGD = -1

Uncategorized error

§

PARAM_DEV_ERROR = -2

Developer error in the parameters to param() call

§

PAY_IN_PROGRESS = 200

In progress

§

PAY_RHASH_ALREADY_USED = 201

rhash already used

§

PAY_UNPARSEABLE_ONION = 202

Unparseable onion address

§

PAY_DESTINATION_PERM_FAIL = 203

Destination permanent failure

§

PAY_TRY_OTHER_ROUTE = 204

Try another route

§

PAY_ROUTE_NOT_FOUND = 205

Route not found

§

PAY_ROUTE_TOO_EXPENSIVE = 206

Route too expensive

§

PAY_INVOICE_EXPIRED = 207

Invoice has expired

§

PAY_NO_SUCH_PAYMENT = 208

No such payment

§

PAY_UNSPECIFIED_ERROR = 209

Unspecified error

§

PAY_STOPPED_RETRYING = 210

Stopped retrying

§

FUND_MAX_EXCEEDED = 300

Funding maximum exceeded

§

FUND_CANNOT_AFFORD = 301

Cannot afford funding

§

FUND_OUTPUT_IS_DUST = 302

Funding output is dust

§

INVOICE_LABEL_ALREADY_EXISTS = 900

Invoice label already exists

§

INVOICE_PREIMAGE_ALREADY_EXISTS = 901

Invoice pre-image already exists

Trait Implementations§

Source§

impl Debug for RpcErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.