#[non_exhaustive]pub enum FetchError {
AuthorityDenied(String),
SubjectNotFound(String),
Throttled(String),
Other(String),
}Expand description
Typed fetch failure. Each variant carries a free-form detail for
audit logs; the composer collapses every variant onto
super::EpochRevocationError::Transient (fail-closed) so the
engine sees a uniform contract regardless of substrate flavor.
0.11.0 BREAKING — widened from pub struct FetchError(pub String)
to a typed enum. The variants exist so Fetcher impls (today
chat-api’s PgFetcher; a possible future AdminSvFetcher over a PAS
per-user readout — design-on-ice in
STANDARDS_AUTH_INVALIDATION §5.4.1) can hand the composer a
substrate-grained reason that survives into dashboards. The composer still collapses to Transient —
fail-closed contract preserved.
#[non_exhaustive] — adding a new variant in a future minor is
non-breaking for downstream Fetcher impls (they construct, they
don’t match) but requires consumers that DO match to carry a
wildcard arm. The composer matches via to_string() /
Display-collapse rather than variant-specific arms, so
downstream additions don’t ripple.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AuthorityDenied(String)
Authority denied — the caller credential is rejected by the
authoritative substrate (e.g. JWT-signed Admin gRPC client
lacks pas.session.read scope, or API-key revoked). Distinct
from SubjectNotFound because the substrate refused even to
answer the query, not “answered: subject doesn’t exist”.
SubjectNotFound(String)
Subject not found — substrate confirmed the queried sub is
absent. For sv-axis this is a “fail closed” signal because
admitting a token whose subject the authority can’t confirm
would let dangling tokens slip through.
Throttled(String)
Throttled — substrate rate-limit / 429-class response. Surfaces as transient so the caller backs off; not a security signal.
Other(String)
Catch-all for substrate transients (network, deserialization,
unspecified 5xx). Replaces 0.10.x’s FetchError(String).
Trait Implementations§
Source§impl Debug for FetchError
impl Debug for FetchError
Source§impl Display for FetchError
impl Display for FetchError
Source§impl Error for FetchError
impl Error for FetchError
1.30.0 · 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()