Skip to content

Commit 5903bf8

Browse files
authored
Merge pull request #80 from kinode-dao/bp/etherrorfix
eth: add explicit rpc error type
2 parents 5598fed + 0042c99 commit 5903bf8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/eth.rs

Lines changed: 4 additions & 1 deletion
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,8 +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 {
76+
/// RPC provider returned an error
77+
RpcError(ErrorPayload),
7578
/// provider module cannot parse message
7679
MalformedRequest,
7780
/// No RPC provider for the chain

0 commit comments

Comments
 (0)