Skip to content

Commit 0042c99

Browse files
committed
eth: RpcError custom type instead of string
1 parent 0044460 commit 0042c99

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/eth.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::{Message, Request as KiRequest};
2+
use alloy_json_rpc::ErrorPayload;
23
pub use alloy_primitives::{Address, BlockHash, BlockNumber, Bytes, TxHash, U128, U256, U64, U8};
34
pub use alloy_rpc_types::pubsub::{Params, SubscriptionKind, SubscriptionResult};
45
pub use alloy_rpc_types::{
@@ -70,10 +71,10 @@ pub enum EthResponse {
7071
Err(EthError),
7172
}
7273

73-
#[derive(Debug, Serialize, Deserialize, PartialEq)]
74+
#[derive(Debug, Serialize, Deserialize)]
7475
pub enum EthError {
7576
/// RPC provider returned an error
76-
RpcError(String),
77+
RpcError(ErrorPayload),
7778
/// provider module cannot parse message
7879
MalformedRequest,
7980
/// No RPC provider for the chain

0 commit comments

Comments
 (0)