Files
pezkuwi-sdk/vendor/pezkuwi-subxt/utils/fetch-metadata/src/error.rs
T
pezkuwichain 1e46750ca1 fix: update pezkuwi-subxt copyright and fix doc test paths
- Update copyright from 'Parity Technologies (UK) Ltd.' to 'Dijital Kurdistan Tech Institute'
- Update year to 2026
- Mark doc tests with relative metadata paths as 'ignore' to fix workspace-level doc tests
- Affected files: runtime_apis.rs, storage.rs, constants.rs, transactions.rs, codegen.rs

The doc tests use relative paths like '../artifacts/*.scale' which only work when
testing the crate directly (-p pezkuwi-subxt), not during workspace-level tests.
The examples/ directory contains the actual runnable test code.
2026-01-27 05:02:32 +03:00

31 lines
1.0 KiB
Rust

// Copyright 2019-2026 Dijital Kurdistan Tech Institute
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
/// Error attempting to fetch metadata.
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
/// Error decoding from a hex value.
#[error("Cannot decode hex value: {0}")]
DecodeError(#[from] hex::FromHexError),
/// Some SCALE codec error.
#[error("Cannot scale encode/decode value: {0}")]
CodecError(#[from] codec::Error),
/// JSON-RPC error fetching metadata.
#[cfg(feature = "url")]
#[error("Request error: {0}")]
RequestError(#[from] jsonrpsee::core::ClientError),
/// Failed IO when fetching from a file.
#[error(
"Failed IO for {0}, make sure that you are providing the correct file path for metadata: {1}"
)]
Io(String, std::io::Error),
/// URL scheme is not http, https, ws or wss.
#[error("'{0}' not supported, supported URI schemes are http, https, ws or wss.")]
InvalidScheme(String),
/// Some other error.
#[error("Other error: {0}")]
Other(String),
}