@@ -26,13 +26,13 @@ pub enum RpcErrorKind {
26
26
NullResp ,
27
27
28
28
/// Rpc server returned an unsupported feature.
29
- #[ error( "unsupported feature: {0 }" ) ]
30
- UnsupportedFeature ( String ) ,
29
+ #[ error( "unsupported feature: {message }" ) ]
30
+ UnsupportedFeature { message : String } ,
31
31
32
32
/// Returned when a local pre-processing step fails. This allows custom
33
33
/// errors from local signers or request pre-processors.
34
- #[ error( "local usage error: {0 }" ) ]
35
- InternalError ( String ) ,
34
+ #[ error( "local usage error: {message }" ) ]
35
+ InternalError { message : String } ,
36
36
37
37
/// JSON serialization error.
38
38
#[ error( "serialization error: {message}" ) ]
@@ -327,10 +327,12 @@ fn to_engine_rpc_error_kind(err: &AlloyRpcError<TransportErrorKind>) -> RpcError
327
327
data : err. data . as_ref ( ) . map ( |data| data. to_string ( ) ) ,
328
328
} ) ,
329
329
AlloyRpcError :: NullResp => RpcErrorKind :: NullResp ,
330
- AlloyRpcError :: UnsupportedFeature ( feature) => {
331
- RpcErrorKind :: UnsupportedFeature ( feature. to_string ( ) )
332
- }
333
- AlloyRpcError :: LocalUsageError ( err) => RpcErrorKind :: InternalError ( err. to_string ( ) ) ,
330
+ AlloyRpcError :: UnsupportedFeature ( feature) => RpcErrorKind :: UnsupportedFeature {
331
+ message : feature. to_string ( ) ,
332
+ } ,
333
+ AlloyRpcError :: LocalUsageError ( err) => RpcErrorKind :: InternalError {
334
+ message : err. to_string ( ) ,
335
+ } ,
334
336
AlloyRpcError :: SerError ( err) => RpcErrorKind :: SerError {
335
337
message : err. to_string ( ) ,
336
338
} ,
@@ -465,4 +467,3 @@ impl From<TwmqError> for EngineError {
465
467
}
466
468
}
467
469
}
468
-
0 commit comments