diff --git a/crates/rpc/rpc-eth-types/src/error.rs b/crates/rpc/rpc-eth-types/src/error.rs index 25e76b2db4..cdf6ef672d 100644 --- a/crates/rpc/rpc-eth-types/src/error.rs +++ b/crates/rpc/rpc-eth-types/src/error.rs @@ -16,8 +16,6 @@ use reth_transaction_pool::error::{ PoolTransactionError, }; use revm::primitives::{EVMError, ExecutionResult, HaltReason, OutOfGasError}; -#[cfg(feature = "js-tracer")] -use revm_inspectors::tracing::js::JsInspectorError; use revm_inspectors::tracing::MuxError; use tracing::error; @@ -194,10 +192,12 @@ impl From for jsonrpsee_types::error::ErrorObject<'static> { } #[cfg(feature = "js-tracer")] -impl From for EthApiError { - fn from(error: JsInspectorError) -> Self { +impl From for EthApiError { + fn from(error: revm_inspectors::tracing::js::JsInspectorError) -> Self { match error { - err @ JsInspectorError::JsError(_) => Self::InternalJsTracerError(err.to_string()), + err @ revm_inspectors::tracing::js::JsInspectorError::JsError(_) => { + Self::InternalJsTracerError(err.to_string()) + } err => Self::InvalidParams(err.to_string()), } }