pub enum DenialReason {
RedirectNotInAllowlist,
InsecureScheme,
HostInBlockList,
SizeCapExceeded,
SchemaDrift,
CapabilityNotGranted,
RateLimitWindow,
SsrfPrivateAddress,
ContentTypeMismatch,
}Expand description
Closed-set reasons a denial-class error envelope can carry on its
optional denial_context.reason field.
Wire form (JSON / MCP) is snake_case — e.g. "redirect_not_in_allowlist".
The set is closed per ADR-0023 §2: adding a new variant is a minor
semver bump; renaming or repurposing one is a breaking change. Mirrors
the stability rule that already governs ErrorCode.
See DenialContext for the surrounding struct, docs/ERRORS.md §3.1
for the wire surface, and docs/PUBLIC_API.md §8 for the
semver-locked surface contract.
Variants§
RedirectNotInAllowlist
Redirect target host did not match the source’s allowlist
(HttpError::RedirectDenied).
InsecureScheme
Redirect target had a non-HTTPS scheme (HttpError::InsecureRedirect).
HostInBlockList
Source produced a URL whose host is on a future blocklist.
Reserved — no producer wired yet. Will be emitted by the future
per-source URL host-blocklist guard once that component lands
(post-Phase-1 supply-chain hardening; see
docs/REDIRECT_ALLOWLIST.md §4 for the staging plan).
SizeCapExceeded
Body exceeded PDF_MAX_BYTES (HttpError::OversizedBody).
SchemaDrift
Store entry’s schema_version is ahead of this binary.
Reserved — no producer wired yet. Will be emitted by the
FsStore schema-rejection path once the read-side bump check
lands (it currently only writes the current SCHEMA_VERSION).
CapabilityNotGranted
Source not in the runtime CapabilityProfile
(FetchError::NotEligible).
RateLimitWindow
Rate limiter rejected the call inside the current window.
Reserved — no producer wired yet. Will be emitted by
RateLimiter once the
limiter surfaces structured denials (Phase 2+; today the
limiter only sleeps to enforce the window).
SsrfPrivateAddress
SSRF guard rejected a private / link-local / cloud-metadata address.
Reserved — no producer wired yet. Will be emitted by the future SSRF pre-flight check (post-Phase-1 supply-chain hardening; the workspace currently relies on rustls + the HTTPS-only redirect policy to keep the attack surface small).
ContentTypeMismatch
Response Content-Type / magic-byte mismatch (HttpError::NotAPdf).
Trait Implementations§
Source§impl Clone for DenialReason
impl Clone for DenialReason
Source§fn clone(&self) -> DenialReason
fn clone(&self) -> DenialReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more