pub enum APIError {
    APIMisuseError {
        err: String,
    },
    FeeRateTooHigh {
        err: String,
        feerate: u32,
    },
    RouteError {
        err: &'static str,
    },
    ChannelUnavailable {
        err: String,
    },
    MonitorUpdateFailed,
    IncompatibleShutdownScript {
        script: ShutdownScript,
    },
}
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

Fields

err: String

A human-readable error message

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.

FeeRateTooHigh

Fields

err: String

A human-readable error message

feerate: u32

The feerate which was too high.

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.

RouteError

Fields

err: &'static str

A human-readable error message

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

ChannelUnavailable

Fields

err: String

A human-readable error message

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.

MonitorUpdateFailed

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

IncompatibleShutdownScript

Fields

script: ShutdownScript

The incompatible shutdown script.

KeysInterface::get_shutdown_scriptpubkey returned a shutdown scriptpubkey incompatible with the channel counterparty as negotiated in InitFeatures.

Using a SegWit v0 script should resolve this issue. If you cannot, you won’t be able to open a channel or cooperatively close one with this peer (and will have to force-close instead).

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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.