mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 22:41:06 +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,
|
BlockError,
|
||||||
Error,
|
Error,
|
||||||
},
|
},
|
||||||
events::{self, Events},
|
events::{
|
||||||
|
self,
|
||||||
|
Events,
|
||||||
|
},
|
||||||
metadata::DecodeWithMetadata,
|
metadata::DecodeWithMetadata,
|
||||||
rpc::{
|
rpc::{
|
||||||
types::{
|
types::{
|
||||||
@@ -67,18 +70,24 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Error resulted from the [`ChainHeadBlock`] methods.
|
/// Error resulted from the [`ChainHeadBlock`] methods.
|
||||||
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum ChainHeadError {
|
pub enum ChainHeadError {
|
||||||
/// The resources requested are inaccessible.
|
/// The resources requested are inaccessible.
|
||||||
///
|
///
|
||||||
/// Resubmitting the request later might succeed.
|
/// Resubmitting the request later might succeed.
|
||||||
|
#[error("Inaccessible: {0}")]
|
||||||
Inaccessible(String),
|
Inaccessible(String),
|
||||||
/// The chain encountered an error. This is definitive.
|
/// The chain encountered an error. This is definitive.
|
||||||
|
#[error("Error: {0}")]
|
||||||
Error(String),
|
Error(String),
|
||||||
/// The provided subscription ID is stale or invalid.
|
/// The provided subscription ID is stale or invalid.
|
||||||
|
#[error("Disjoint")]
|
||||||
Disjoint,
|
Disjoint,
|
||||||
/// The RPC target node does not contain the given resource.
|
/// The RPC target node does not contain the given resource.
|
||||||
|
#[error("Resource does not exist on the RPC target node")]
|
||||||
ResourceNonExistent,
|
ResourceNonExistent,
|
||||||
/// An error occurred internally. This is definitive.
|
/// An error occurred internally. This is definitive.
|
||||||
|
#[error("Other: {0}")]
|
||||||
Other(String),
|
Other(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user