mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-27 09:37:13 +01:00
24 lines
501 B
Rust
24 lines
501 B
Rust
//! Error for LNbits ln backend
|
|
|
|
use thiserror::Error;
|
|
|
|
/// LNbits Error
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
/// Invoice amount not defined
|
|
#[error("Unknown invoice amount")]
|
|
UnknownInvoiceAmount,
|
|
/// Unknown invoice
|
|
#[error("Unknown invoice")]
|
|
UnknownInvoice,
|
|
/// Anyhow error
|
|
#[error(transparent)]
|
|
Anyhow(#[from] anyhow::Error),
|
|
}
|
|
|
|
impl From<Error> for cdk::cdk_lightning::Error {
|
|
fn from(e: Error) -> Self {
|
|
Self::Lightning(Box::new(e))
|
|
}
|
|
}
|