Enum lightning::util::errors::APIError[][src]

pub enum APIError {
    APIMisuseError {
        err: String,
    },
    FeeRateTooHigh {
        err: String,
        feerate: u32,
    },
    RouteError {
        err: &'static str,
    },
    ChannelUnavailable {
        err: String,
    },
    MonitorUpdateFailed,
}
Expand description

Indicates an error on the client’s part (usually some variant of attempting to use too-low or too-high values)

Variants

APIMisuseError

Indicates the API was wholly misused (see err for more). Cases where these can be returned are documented, but generally indicates some precondition of a function was violated.

Show fields

Fields of APIMisuseError

err: String

A human-readable error message

FeeRateTooHigh

Due to a high feerate, we were unable to complete the request. For example, this may be returned if the feerate implies we cannot open a channel at the requested value, but opening a larger channel would succeed.

Show fields

Fields of FeeRateTooHigh

err: String

A human-readable error message

feerate: u32

The feerate which was too high.

RouteError

A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, too-many-hops, etc).

Show fields

Fields of RouteError

err: &'static str

A human-readable error message

ChannelUnavailable

We were unable to complete the request as the Channel required to do so is unable to complete the request (or was not found). This can take many forms, including disconnected peer, channel at capacity, channel shutting down, etc.

Show fields

Fields of ChannelUnavailable

err: String

A human-readable error message

MonitorUpdateFailed

An attempt to call watch/update_channel returned an Err (ie you did this!), causing the attempted action to fail.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.