better error log

This commit is contained in:
Bryan Stitt 2022-05-12 21:29:33 +00:00
parent 9f4b9cdb92
commit 82aff37054
2 changed files with 2 additions and 5 deletions

View File

@ -144,10 +144,7 @@ impl Web3Connection {
} }
} }
Err(e) => { Err(e) => {
// TODO: this is not the right way to use anyhow let e = anyhow::Error::from(e).context(format!("{}", connection));
let e_str = format!("{}", e);
let e = anyhow::Error::from(e).context(format!("{:?}: {}", connection, e_str));
return Err(e); return Err(e);
} }
} }

View File

@ -78,7 +78,7 @@ impl Web3Connections {
.await .await
{ {
Ok(connection) => connections.push(connection), 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),
} }
} }