Skip to content

Commit

Permalink
Shows error message if invoice is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch committed Dec 18, 2024
1 parent dd13f64 commit 58c462e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cli/add_invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ pub async fn execute_add_invoice(
} else {
match is_valid_invoice(invoice) {
Ok(i) => Some(Payload::PaymentRequest(None, i.to_string(), None)),
Err(_) => None,
Err(e) => {
println!("Invalid invoice: {}", e);
None
}
}
};
let request_id = Uuid::new_v4().as_u128() as u64;
Expand Down

0 comments on commit 58c462e

Please sign in to comment.