diff --git a/crates/cheatcodes/src/error.rs b/crates/cheatcodes/src/error.rs index 85be519bfd5e2..d459e9274bb22 100644 --- a/crates/cheatcodes/src/error.rs +++ b/crates/cheatcodes/src/error.rs @@ -293,7 +293,6 @@ impl_from!( alloy_primitives::SignatureError, FsPathError, hex::FromHexError, - eyre::Error, BackendError, DatabaseError, jsonpath_lib::JsonPathError, @@ -316,6 +315,17 @@ impl> From> for Error { } } +impl From for Error { + #[inline] + fn from(err: eyre::Report) -> Self { + let mut chained_cause = String::new(); + for cause in err.chain() { + chained_cause.push_str(format!(" {cause};").as_str()); + } + Self::display(chained_cause) + } +} + #[cfg(test)] mod tests { use super::*;