Skip to main content

ClnRpcError

Type Alias ClnRpcError 

Source
pub type ClnRpcError = i32;
Expand description

Type alias for Core Lightning RPC error codes.

CLN uses specific numeric codes to indicate different types of failures in payment operations. This type preserves the original error code for debugging and logging purposes.

Trait Implementations§

Source§

impl ErrorCode for ClnRpcError

Implementation of ErrorCode for CLN RPC errors.

This implementation treats all i32 values as valid error codes, allowing us to preserve any error code returned by CLN without loss.

Source§

fn code(&self) -> i32

Returns the numeric error code for this error type. Read more
Source§

fn from_code(code: i32) -> Option<Self>
where Self: Sized,

Attempts to construct an error code from its numeric representation. Read more