Skip to content

Commit 58c462e

Browse files
committed
Shows error message if invoice is not valid
1 parent dd13f64 commit 58c462e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cli/add_invoice.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ pub async fn execute_add_invoice(
3535
} else {
3636
match is_valid_invoice(invoice) {
3737
Ok(i) => Some(Payload::PaymentRequest(None, i.to_string(), None)),
38-
Err(_) => None,
38+
Err(e) => {
39+
println!("Invalid invoice: {}", e);
40+
None
41+
}
3942
}
4043
};
4144
let request_id = Uuid::new_v4().as_u128() as u64;

0 commit comments

Comments
 (0)