Make verbose rpc error display (#758)

* Make verbose rpc erro display

* Apply review results

* Minor fix doc-comment
This commit is contained in:
Sabaun Taraki
2023-01-09 17:43:50 +03:00
committed by GitHub
parent 392c1915ca
commit d41f657417
+2 -1
View File
@@ -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,
}