mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Pre-create metrics registry before loop is started + administrative metrics (#848)
* administrative metrics * fmt * fix compilation * fix compilation again * and another one * remove GenericLoopMetrics * chttp -> isahc * remove redundant marker * not about price metrics * fmt
This commit is contained in:
committed by
Bastian Köcher
parent
21baffc832
commit
cb90ea0979
@@ -38,6 +38,8 @@ pub enum Error {
|
||||
AccountDoesNotExist,
|
||||
/// The client we're connected to is not synced, so we can't rely on its state.
|
||||
ClientNotSynced(Health),
|
||||
/// An error has happened when we have tried to parse storage proof.
|
||||
StorageProofError(bp_runtime::StorageProofError),
|
||||
/// Custom logic error.
|
||||
Custom(String),
|
||||
}
|
||||
@@ -50,6 +52,7 @@ impl std::error::Error for Error {
|
||||
Self::UninitializedBridgePallet => None,
|
||||
Self::AccountDoesNotExist => None,
|
||||
Self::ClientNotSynced(_) => None,
|
||||
Self::StorageProofError(_) => None,
|
||||
Self::Custom(_) => None,
|
||||
}
|
||||
}
|
||||
@@ -81,6 +84,7 @@ impl std::fmt::Display for Error {
|
||||
Self::ResponseParseFailed(e) => e.to_string(),
|
||||
Self::UninitializedBridgePallet => "The Substrate bridge pallet has not been initialized yet.".into(),
|
||||
Self::AccountDoesNotExist => "Account does not exist on the chain".into(),
|
||||
Self::StorageProofError(e) => format!("Error when parsing storage proof: {:?}", e),
|
||||
Self::ClientNotSynced(health) => format!("Substrate client is not synced: {}", health),
|
||||
Self::Custom(e) => e.clone(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user