mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-15 10:55:55 +01:00
27 lines
590 B
Rust
27 lines
590 B
Rust
//! Error for Strike ln backend
|
|
|
|
use thiserror::Error;
|
|
|
|
/// Strike Error
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
/// Invoice amount not defined
|
|
#[error("Unknown invoice amount")]
|
|
UnknownInvoiceAmount,
|
|
/// Unknown invoice
|
|
#[error("Unknown invoice")]
|
|
UnknownInvoice,
|
|
/// Strikers error
|
|
#[error(transparent)]
|
|
StrikeRs(#[from] strike_rs::Error),
|
|
/// 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))
|
|
}
|
|
}
|