mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +00:00
Make verbose rpc error display (#758)
* Make verbose rpc erro display * Apply review results * Minor fix doc-comment
This commit is contained in:
+2
-1
@@ -107,13 +107,14 @@ impl From<DispatchError> for Error {
|
|||||||
/// An RPC error. Since we are generic over the RPC client that is used,
|
/// An RPC error. Since we are generic over the RPC client that is used,
|
||||||
/// the error is boxed and could be casted.
|
/// the error is boxed and could be casted.
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
#[error("RPC error")]
|
|
||||||
pub enum RpcError {
|
pub enum RpcError {
|
||||||
// Dev note: We need the error to be safely sent between threads
|
// Dev note: We need the error to be safely sent between threads
|
||||||
// for `subscribe_to_block_headers_filling_in_gaps` and friends.
|
// for `subscribe_to_block_headers_filling_in_gaps` and friends.
|
||||||
/// Error related to the RPC client.
|
/// Error related to the RPC client.
|
||||||
|
#[error("RPC error: {0}")]
|
||||||
ClientError(Box<dyn std::error::Error + Send + Sync + 'static>),
|
ClientError(Box<dyn std::error::Error + Send + Sync + 'static>),
|
||||||
/// The RPC subscription dropped.
|
/// The RPC subscription dropped.
|
||||||
|
#[error("RPC error: subscription dropped.")]
|
||||||
SubscriptionDropped,
|
SubscriptionDropped,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user