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

@ -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);
}
}

@ -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),
}
}