From 82aff37054565acdc9e0270970ab398699d52ed7 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 12 May 2022 21:29:33 +0000 Subject: [PATCH] better error log --- web3-proxy/src/connection.rs | 5 +---- web3-proxy/src/connections.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/web3-proxy/src/connection.rs b/web3-proxy/src/connection.rs index d3951a09..f63dd31e 100644 --- a/web3-proxy/src/connection.rs +++ b/web3-proxy/src/connection.rs @@ -144,10 +144,7 @@ impl Web3Connection { } } Err(e) => { - // TODO: this is not the right way to use anyhow - let e_str = format!("{}", e); - let e = anyhow::Error::from(e).context(format!("{:?}: {}", connection, e_str)); - + let e = anyhow::Error::from(e).context(format!("{}", connection)); return Err(e); } } diff --git a/web3-proxy/src/connections.rs b/web3-proxy/src/connections.rs index b8cdfa18..46f60dae 100644 --- a/web3-proxy/src/connections.rs +++ b/web3-proxy/src/connections.rs @@ -78,7 +78,7 @@ impl Web3Connections { .await { Ok(connection) => connections.push(connection), - Err(e) => warn!("Unable to connect to a server! {}", e), + Err(e) => warn!("Unable to connect to a server! {:?}", e), } }