@@ -22,7 +22,7 @@ use reth_transaction_pool::error::{
2222use revm:: context_interface:: result:: {
2323 EVMError , HaltReason , InvalidHeader , InvalidTransaction , OutOfGasError ,
2424} ;
25- use revm_inspectors:: tracing:: MuxError ;
25+ use revm_inspectors:: tracing:: { DebugInspectorError , MuxError } ;
2626use std:: convert:: Infallible ;
2727use tokio:: sync:: oneshot:: error:: RecvError ;
2828
@@ -407,6 +407,25 @@ impl From<revm_inspectors::tracing::js::JsInspectorError> for EthApiError {
407407 }
408408}
409409
410+ impl < Err > From < DebugInspectorError < Err > > for EthApiError
411+ where
412+ Err : core:: error:: Error + Send + Sync + ' static ,
413+ {
414+ fn from ( error : DebugInspectorError < Err > ) -> Self {
415+ match error {
416+ DebugInspectorError :: InvalidTracerConfig => Self :: InvalidTracerConfig ,
417+ DebugInspectorError :: UnsupportedTracer => Self :: Unsupported ( "unsupported tracer" ) ,
418+ DebugInspectorError :: JsTracerNotEnabled => {
419+ Self :: Unsupported ( "JS Tracer is not enabled" )
420+ }
421+ DebugInspectorError :: MuxInspector ( err) => err. into ( ) ,
422+ DebugInspectorError :: Database ( err) => Self :: Internal ( RethError :: other ( err) ) ,
423+ #[ cfg( feature = "js-tracer" ) ]
424+ DebugInspectorError :: JsInspector ( err) => err. into ( ) ,
425+ }
426+ }
427+ }
428+
410429impl From < RethError > for EthApiError {
411430 fn from ( error : RethError ) -> Self {
412431 match error {
0 commit comments