From 256cb5bd5d846b16c5cffd17139be19c0256ef85 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 12 Jan 2023 13:56:39 -0800 Subject: [PATCH] more verbose error --- web3_proxy/src/app/mod.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index 42f78632..5ec9d856 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -1426,9 +1426,11 @@ impl Web3ProxyApp { // TODO: what is the best way to handle an Arc here? .map_err(|err| { // TODO: emit a stat for an error - anyhow::anyhow!(err) - }) - .context("error while forwarding and caching response")? + anyhow::anyhow!( + "error while caching and forwarding response: {}", + err + ) + })? } else { self.balanced_rpcs .try_send_best_upstream_server( @@ -1439,7 +1441,10 @@ impl Web3ProxyApp { None, ) .await - .context("error while forwarding response")? + .map_err(|err| { + // TODO: emit a stat for an error + anyhow::anyhow!("error while forwarding response: {}", err) + })? } };