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
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.
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
impl StructuralPartialEq for APIError
Auto Trait Implementations
impl RefUnwindSafe for APIError
impl Send for APIError
impl Sync for APIError
impl Unpin for APIError
impl UnwindSafe for APIError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more