mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 19:37:56 +00:00
blocks: Debug new error type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -11,7 +11,10 @@ use crate::{
|
||||
BlockError,
|
||||
Error,
|
||||
},
|
||||
events::{self, Events},
|
||||
events::{
|
||||
self,
|
||||
Events,
|
||||
},
|
||||
metadata::DecodeWithMetadata,
|
||||
rpc::{
|
||||
types::{
|
||||
@@ -67,18 +70,24 @@ where
|
||||
}
|
||||
|
||||
/// Error resulted from the [`ChainHeadBlock`] methods.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum ChainHeadError {
|
||||
/// The resources requested are inaccessible.
|
||||
///
|
||||
/// Resubmitting the request later might succeed.
|
||||
#[error("Inaccessible: {0}")]
|
||||
Inaccessible(String),
|
||||
/// The chain encountered an error. This is definitive.
|
||||
#[error("Error: {0}")]
|
||||
Error(String),
|
||||
/// The provided subscription ID is stale or invalid.
|
||||
#[error("Disjoint")]
|
||||
Disjoint,
|
||||
/// The RPC target node does not contain the given resource.
|
||||
#[error("Resource does not exist on the RPC target node")]
|
||||
ResourceNonExistent,
|
||||
/// An error occurred internally. This is definitive.
|
||||
#[error("Other: {0}")]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user