From 85c9d8b359f22f230be775f007809501e7aad2f4 Mon Sep 17 00:00:00 2001 From: Sabaun Taraki Date: Mon, 26 Dec 2022 22:24:47 +0300 Subject: [PATCH 1/3] Make verbose rpc erro display --- subxt/src/error.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subxt/src/error.rs b/subxt/src/error.rs index dd87277646..8bcc6004f2 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -107,13 +107,14 @@ impl From for Error { /// An RPC error. Since we are generic over the RPC client that is used, /// the error is boxed and could be casted. #[derive(Debug, thiserror::Error)] -#[error("RPC error")] pub enum RpcError { // Dev note: We need the error to be safely sent between threads // for `subscribe_to_block_headers_filling_in_gaps` and friends. /// Error related to the RPC client. + #[error("{0}")] ClientError(Box), /// The RPC subscription dropped. + #[error("Subscription dropped.")] SubscriptionDropped, } From 195916823f603cc8368df15801ea9194ef2c8090 Mon Sep 17 00:00:00 2001 From: Sabaun Taraki Date: Mon, 9 Jan 2023 16:37:19 +0300 Subject: [PATCH 2/3] Apply review results --- subxt/src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 8bcc6004f2..bf747822a4 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -111,10 +111,10 @@ pub enum RpcError { // Dev note: We need the error to be safely sent between threads // for `subscribe_to_block_headers_filling_in_gaps` and friends. /// Error related to the RPC client. - #[error("{0}")] + #[error("RPC error: {0}")] ClientError(Box), /// The RPC subscription dropped. - #[error("Subscription dropped.")] + #[error("RPC error: Subscription dropped.")] SubscriptionDropped, } From 749c952a7af5c2fc39a5cce60a1b2905957fc08a Mon Sep 17 00:00:00 2001 From: Sabaun Taraki Date: Mon, 9 Jan 2023 16:40:09 +0300 Subject: [PATCH 3/3] Minor fix doc-comment --- subxt/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/error.rs b/subxt/src/error.rs index bf747822a4..b2548e43cf 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -114,7 +114,7 @@ pub enum RpcError { #[error("RPC error: {0}")] ClientError(Box), /// The RPC subscription dropped. - #[error("RPC error: Subscription dropped.")] + #[error("RPC error: subscription dropped.")] SubscriptionDropped, }