pub enum APIError {
APIMisuseError {
err: String,
},
FeeRateTooHigh {
err: String,
feerate: u32,
},
RouteError {
err: &'static str,
},
ChannelUnavailable {
err: String,
},
MonitorUpdateInProgress,
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
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
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.
MonitorUpdateInProgress
An attempt to call chain::Watch::watch_channel
/chain::Watch::update_channel
returned a ChannelMonitorUpdateStatus::InProgress
indicating the persistence of a
monitor update is awaiting async resolution. Once it resolves the attempted action should
complete automatically.
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).