From f9dcac07fd65792915cceed44f6977695a8a0503 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:46:29 +0100 Subject: [PATCH] Include entire error cause-chain in API response --- swap/src/api/request.rs | 2 +- swap/src/rpc/methods.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/swap/src/api/request.rs b/swap/src/api/request.rs index 2e8eafa2..50e29dca 100644 --- a/swap/src/api/request.rs +++ b/swap/src/api/request.rs @@ -834,7 +834,7 @@ impl Request { .await .map_err(|err| { method_span.in_scope(|| { - tracing::debug!(%err, "API call resulted in an error"); + tracing::debug!(err=format!("{:?}", err), "API call resulted in an error"); }); err }) diff --git a/swap/src/rpc/methods.rs b/swap/src/rpc/methods.rs index 2cd7fb18..cb60af76 100644 --- a/swap/src/rpc/methods.rs +++ b/swap/src/rpc/methods.rs @@ -212,5 +212,5 @@ async fn execute_request( request .call(Arc::clone(context)) .await - .map_err(|err| jsonrpsee_core::Error::Custom(err.to_string())) + .map_err(|err| jsonrpsee_core::Error::Custom(format!("{:#}", err))) }