pub enum CatalogError {
Show 33 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,
},
InvalidAgreementDigest {
value: String,
},
AgreementDigestMismatch {
expected: String,
actual: 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)
Catalog JSON could not be encoded or decoded.
UnsupportedSchemaVersion
The catalog uses a schema other than the current version-1 contract.
Fields
NetworkMismatch
Catalog network identity does not match the required authority.
RegistryCanisterMismatch
Catalog Registry canister identity does not match mainnet authority.
Fields
InvalidRegistryVersion
Registry version zero cannot identify an authority snapshot.
EmptySubnets
The catalog contains no Subnet records.
EmptyRoutingRanges
The catalog contains no routing authority ranges.
InvalidPrincipal
A catalog identity or routing boundary is not a valid IC principal.
Fields
DuplicateSubnet
Multiple Subnet rows claim the same principal.
NonCanonicalSubnetOrder
Subnet rows are not strictly ordered by canonical principal text.
UnknownRoutingSubnet
A routing range points to a Subnet absent from the catalog.
InvalidRoutingRange
A routing range’s principal-byte boundaries are reversed.
Fields
OverlappingRoutingRanges
Two inclusive routing ranges cover a common principal.
Fields
first: Box<RoutingRange>Earlier range in canonical routing order.
second: Box<RoutingRange>Later range that overlaps the earlier range.
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
ChargingPolicyMismatch
Charging default contradicts the raw Registry Subnet kind.
Fields
ClassificationMismatch
Classification metadata contradicts its policy or source.
Fields
InvalidTimestamp
A provenance timestamp is not valid canonical UTC text.
FutureTimestamp
A provenance timestamp is beyond the caller’s future-skew policy.
Fields
InvalidSourceEndpoint
A source endpoint is not a clean credential-free HTTP(S) base URL.
InvalidProvenance
Provenance evidence is internally inconsistent.
UnsupportedAssurance
Serialized raw evidence cannot establish the claimed assurance level.
ClassificationPolicyVersionMismatch
Classification policy schema is not supported by this build.
ClassificationPolicyDigestMismatch
Classification policy digest does not match this build.
ResolverPolicyMismatch
Resolver implementation identity does not match this build.
Fields
InvalidCatalogDigest
Catalog digest is not exactly 32 lowercase hexadecimal bytes.
InvalidAgreementDigest
Agreement digest is absent or not exactly 32 lowercase hexadecimal bytes.
AgreementDigestMismatch
Stored agreement digest does not match the canonical Registry payload.
CatalogDigestMismatch
Stored catalog digest does not match the canonical authority payload.
UnknownSubnet
An exact Subnet lookup did not match a catalog row.
PrincipalPrefixNotFound
A Subnet principal prefix has no catalog match.
AmbiguousPrincipalPrefix
A Subnet principal prefix matches more than one catalog row.
Fields
RouteNotFound
No routing range covers the requested canister at this Registry version.
Trait Implementations§
Source§impl Debug for CatalogError
impl Debug for CatalogError
Source§impl Display for CatalogError
impl Display for CatalogError
Source§impl Error for CatalogError
impl Error for CatalogError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()