mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-20 06:05:09 +01:00
feat: lnbits ln backend
fix: check webhook url is valid
This commit is contained in:
23
crates/cdk-lnbits/src/error.rs
Normal file
23
crates/cdk-lnbits/src/error.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
//! 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,
|
||||
/// 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))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user