Skip to content

Commit

Permalink
Make verbose rpc error display (#758)
Browse files Browse the repository at this point in the history
* Make verbose rpc erro display

* Apply review results

* Minor fix doc-comment
  • Loading branch information
techraed authored Jan 9, 2023
1 parent 392c191 commit d41f657
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subxt/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,14 @@ impl From<DispatchError> 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("RPC error: {0}")]
ClientError(Box<dyn std::error::Error + Send + Sync + 'static>),
/// The RPC subscription dropped.
#[error("RPC error: subscription dropped.")]
SubscriptionDropped,
}

Expand Down

0 comments on commit d41f657

Please sign in to comment.