Skip to main content

CatalogError

Enum CatalogError 

Source
pub enum CatalogError {
Show 31 variants Json(Error), UnsupportedSchemaVersion { found: u32, supported: u32, }, NetworkMismatch { expected: String, actual: String, }, RegistryCanisterMismatch { expected: String, actual: String, }, InvalidRegistryVersion, EmptySubnets, EmptyRoutingRanges, InvalidPrincipal { field: &'static str, value: String, reason: String, }, DuplicateSubnet { subnet_principal: String, }, NonCanonicalSubnetOrder { previous: String, current: String, }, UnknownRoutingSubnet { subnet_principal: String, }, InvalidRoutingRange { subnet_principal: String, start_canister_id: String, end_canister_id: String, }, OverlappingRoutingRanges { first: Box<RoutingRange>, second: Box<RoutingRange>, }, NonCanonicalRoutingOrder { previous: Box<RoutingRange>, current: Box<RoutingRange>, }, SubnetKindMismatch { subnet_principal: String, registry_subnet_type: i32, expected: String, actual: String, }, ChargingPolicyMismatch { subnet_principal: String, expected: bool, actual: bool, }, ClassificationMismatch { subnet_principal: String, field: &'static str, reason: String, }, InvalidTimestamp { field: &'static str, value: String, }, FutureTimestamp { field: &'static str, value: String, latest_allowed_unix_secs: u64, }, InvalidSourceEndpoint { endpoint: String, reason: String, }, InvalidProvenance { field: &'static str, reason: String, }, UnsupportedAssurance { assurance: String, }, ClassificationPolicyVersionMismatch { found: u32, supported: u32, }, ClassificationPolicyDigestMismatch { expected: String, actual: String, }, ResolverPolicyMismatch { expected_version: u32, actual_version: u32, expected_backend: String, actual_backend: String, }, InvalidCatalogDigest { value: String, }, CatalogDigestMismatch { expected: String, actual: String, }, UnknownSubnet { subnet_principal: String, }, PrincipalPrefixNotFound { prefix: String, }, AmbiguousPrincipalPrefix { prefix: String, matches: Vec<String>, }, RouteNotFound { canister_principal: String, registry_version: u64, catalog_schema_version: u32, },
}
Expand description

CatalogError

Errors returned while parsing, validating, or resolving a subnet catalog.

Variants§

§

Json(Error)

§

UnsupportedSchemaVersion

Fields

§found: u32
§supported: u32
§

NetworkMismatch

Catalog network identity does not match the required authority.

Fields

§expected: String

Required network identity.

§actual: String

Catalog network identity.

§

RegistryCanisterMismatch

Catalog Registry canister identity does not match mainnet authority.

Fields

§expected: String

Required Registry canister principal.

§actual: String

Catalog Registry canister principal.

§

InvalidRegistryVersion

Registry version zero cannot identify an authority snapshot.

§

EmptySubnets

§

EmptyRoutingRanges

§

InvalidPrincipal

Fields

§field: &'static str
§value: String
§reason: String
§

DuplicateSubnet

Fields

§subnet_principal: String
§

NonCanonicalSubnetOrder

Subnet rows are not strictly ordered by canonical principal text.

Fields

§previous: String

Previous Subnet principal.

§current: String

Current Subnet principal.

§

UnknownRoutingSubnet

Fields

§subnet_principal: String
§

InvalidRoutingRange

Fields

§subnet_principal: String
§start_canister_id: String
§end_canister_id: String
§

OverlappingRoutingRanges

Fields

§

NonCanonicalRoutingOrder

Routing ranges are not strictly ordered by principal bytes and target.

Fields

§previous: Box<RoutingRange>

Previous routing range.

§current: Box<RoutingRange>

Current routing range.

§

SubnetKindMismatch

Derived Subnet kind contradicts its raw Registry numeric code.

Fields

§subnet_principal: String

Subnet principal.

§registry_subnet_type: i32

Raw Registry numeric discriminant.

§expected: String

Kind required by the raw discriminant.

§actual: String

Kind supplied by the raw catalog.

§

ChargingPolicyMismatch

Charging default contradicts the raw Registry Subnet kind.

Fields

§subnet_principal: String

Subnet principal.

§expected: bool

Charging default required by the raw kind.

§actual: bool

Charging default supplied by the raw catalog.

§

ClassificationMismatch

Classification metadata contradicts its policy or source.

Fields

§subnet_principal: String

Subnet principal.

§field: &'static str

Invalid classification field.

§reason: String

Deterministic mismatch reason.

§

InvalidTimestamp

A provenance timestamp is not valid canonical UTC text.

Fields

§field: &'static str

Timestamp field.

§value: String

Invalid timestamp text.

§

FutureTimestamp

A provenance timestamp is beyond the caller’s future-skew policy.

Fields

§field: &'static str

Timestamp field.

§value: String

Future timestamp text.

§latest_allowed_unix_secs: u64

Latest accepted Unix time.

§

InvalidSourceEndpoint

A source endpoint is not a clean credential-free HTTP(S) base URL.

Fields

§endpoint: String

Invalid endpoint.

§reason: String

Endpoint validation reason.

§

InvalidProvenance

Provenance evidence is internally inconsistent.

Fields

§field: &'static str

Invalid provenance field.

§reason: String

Deterministic validation reason.

§

UnsupportedAssurance

The build does not yet have a verifier for the claimed assurance level.

Fields

§assurance: String

Unsupported assurance label.

§

ClassificationPolicyVersionMismatch

Classification policy schema is not supported by this build.

Fields

§found: u32

Catalog policy schema.

§supported: u32

Supported policy schema.

§

ClassificationPolicyDigestMismatch

Classification policy digest does not match this build.

Fields

§expected: String

Expected policy digest.

§actual: String

Catalog policy digest.

§

ResolverPolicyMismatch

Resolver implementation identity does not match this build.

Fields

§expected_version: u32

Expected resolver schema.

§actual_version: u32

Catalog resolver schema.

§expected_backend: String

Expected resolver backend.

§actual_backend: String

Catalog resolver backend.

§

InvalidCatalogDigest

Catalog digest is not exactly 32 lowercase hexadecimal bytes.

Fields

§value: String

Invalid digest text.

§

CatalogDigestMismatch

Stored catalog digest does not match the canonical authority payload.

Fields

§expected: String

Recomputed digest.

§actual: String

Stored digest.

§

UnknownSubnet

Fields

§subnet_principal: String
§

PrincipalPrefixNotFound

Fields

§prefix: String
§

AmbiguousPrincipalPrefix

Fields

§prefix: String
§matches: Vec<String>
§

RouteNotFound

Fields

§canister_principal: String
§registry_version: u64
§catalog_schema_version: u32

Trait Implementations§

Source§

impl Debug for CatalogError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CatalogError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CatalogError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for CatalogError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Sync + Send + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Sync + Send + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Sync + Send>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.