From 1532add65cf6ac2e2b754f416ef153c6381694a4 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:02:10 +0200 Subject: [PATCH] print entire error chain --- swap/src/api/request.rs | 1 + swap/src/cli/cancel_and_refund.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/swap/src/api/request.rs b/swap/src/api/request.rs index 338432c3..a51eb114 100644 --- a/swap/src/api/request.rs +++ b/swap/src/api/request.rs @@ -821,6 +821,7 @@ impl Request { .await .map_err(|err| { method_span.in_scope(|| { + // The {:?} formatter is used to print the entire error chain tracing::debug!(err = format!("{:?}", err), "API call resulted in an error"); }); err diff --git a/swap/src/cli/cancel_and_refund.rs b/swap/src/cli/cancel_and_refund.rs index 2d23c29a..7e63d1ed 100644 --- a/swap/src/cli/cancel_and_refund.rs +++ b/swap/src/cli/cancel_and_refund.rs @@ -165,7 +165,7 @@ pub async fn refund( Ok(ExpiredTimelocks::None { blocks_left }) => { bail!( bitcoin_publication_err.context(format!( - "Cannot refund swap because the refund timelock has not expired yet. Blocks left: {}", + "Cannot refund swap because the cancel timelock has not expired yet. Blocks left: {}", blocks_left )) );