Use specific error for case when para head is missing from the bridge pallet (#1829)

* use specific error for case when para head is missing from the bridge pallet

* fix match to support both error types
This commit is contained in:
Svyatoslav Nikolsky authored and Bastian Köcher committed 2024-04-10 10:28:37 +02:00
1 parent 4689dfaf2c
commit 606768bc6a
3 files changed
+12 -5

No files matched your search

@@ -61,6 +61,9 @@ pub enum Error {
/// The bridge pallet is not yet initialized and all transactions will be rejected.
#[error("Bridge pallet is not initialized.")]
BridgePalletIsNotInitialized,
/// There's no best head of the parachain at the `pallet-bridge-parachains` at the target side.
#[error("No head of the ParaId({0}) at the bridge parachains pallet at {1}.")]
NoParachainHeadAtTarget(u32, String),
/// An error has happened when we have tried to parse storage proof.
#[error("Error when parsing storage proof: {0:?}.")]
StorageProofError(bp_runtime::StorageProofError),