diff --git a/subxt/src/error/mod.rs b/subxt/src/error/mod.rs index 70685f1a31..51bfc3f82e 100644 --- a/subxt/src/error/mod.rs +++ b/subxt/src/error/mod.rs @@ -44,8 +44,8 @@ pub enum Error { #[error("Metadata: {0}")] MetadataDecoding(#[from] MetadataTryFromError), /// Runtime error. - #[error("Runtime error: {0:?}")] - Runtime(#[from] DispatchError), + #[error("Runtime error: {}", .0.to_string())] + Runtime(DispatchError), /// Error decoding to a [`crate::dynamic::Value`]. #[error("Error decoding into dynamic value: {0}")] Decode(#[from] DecodeError), diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index 97aa77e8c3..e5eaf3fbd1 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -362,7 +362,7 @@ impl> TxInBlock { if ev.pallet_name() == "System" && ev.variant_name() == "ExtrinsicFailed" { let dispatch_error = DispatchError::decode_from(ev.field_bytes(), self.client.metadata())?; - return Err(dispatch_error.into()); + return Err(Error::Runtime(dispatch_error)); } }