Skip to main content

Module error

Module error 

Source
Expand description

Error types for the ACDP library.

Error variants align with the wire vocabulary defined by acdp-error.schema.json and RFC-ACDP-0007 §5. The AcdpError::from_wire_error helper converts a crate::wire_error::WireError (HTTP response body shape) into a typed variant.

Structs§

SsrfDnsRefusal
Typed marker for an SSRF-policy refusal raised while resolving a hostname (RFC-ACDP-0006 §7.1 / RFC-ACDP-0008 §4.8 DNS-rebinding protection).

Enums§

AcdpError
Top-level error type.
SupersessionReason
Sub-reason for AcdpError::SupersededTarget. Starts from the details.reason values enumerated by acdp-error.schema.json’s superseded_target description (not_found, lineage_mismatch, version_mismatch, already_superseded, cross_registry_supersession_unsupported) and adds typed reasons this library recognizes beyond what that enum currently lists (LineageWalkFailed, RevocationTypeMismatch) — it is a superset, not a mirror. #[non_exhaustive] plus the Other catch-all below is what keeps a schema addition from being a breaking change here.

Constants§

SSRF_POLICY_PREFIX
Prefix every SSRF-policy refusal message produced by this workspace starts with: the acdp-safe-http checks (SsrfPolicy::check_url, check_ip, pin_resolved_ip, SafeDnsResolver) and the AcdpError::SchemaViolation that From<reqwest::Error> builds for a refused request. Matched with starts_with, never contains, so a message that merely mentions the policy (a URL, an echoed registry error) does not classify.

Functions§

error_chain_message
Render err followed by every error in its source() chain, joined by ": ".
is_ssrf_refusal
Whether err — or any error in its source() chain — is an SSRF-policy refusal.