pub enum CredentialFailure {
Expired {
expires_at: u64,
},
SignedOut,
StoreUnreadable,
EnvVarMissing {
env_var: String,
},
RaceRetryable,
}Expand description
Why a credential was unusable, as data — see
InferenceError::CredentialUnavailable.
These need different remedies, which is the whole reason they are
separated: re-authenticating fixes SignedOut and Expired, does nothing
for StoreUnreadable (unlock the keychain), and is the wrong advice
entirely for EnvVarMissing (set the variable). A long job that dies on one
while being told to do the other is Parslee-ai/car#797.
Variants§
Expired
A Parslee session existed and its access token aged out; refresh did not
yield a new one. expires_at is unix seconds.
The distinguishing case from #797: the account is fine, it is the run that outlived the token. Consumers that can checkpoint should treat this as resumable-after-reauth rather than as a hard configuration error.
SignedOut
A published tombstone: no account is active. The only state that genuinely means “log in”.
StoreUnreadable
The credential store could not be read (locked keychain, helper timeout). Says nothing about whether credentials exist — notably NOT a sign-out, and re-authenticating is the wrong reflex.
EnvVarMissing
A plain env/keychain-backed provider whose variable did not resolve.
RaceRetryable
The store reported an active session on the failure-path re-read — a race between the two reads, so the request is worth retrying.
Trait Implementations§
Source§impl Clone for CredentialFailure
impl Clone for CredentialFailure
Source§impl Debug for CredentialFailure
impl Debug for CredentialFailure
impl Eq for CredentialFailure
Source§impl PartialEq for CredentialFailure
impl PartialEq for CredentialFailure
impl StructuralPartialEq for CredentialFailure
Auto Trait Implementations§
impl Freeze for CredentialFailure
impl RefUnwindSafe for CredentialFailure
impl Send for CredentialFailure
impl Sync for CredentialFailure
impl Unpin for CredentialFailure
impl UnsafeUnpin for CredentialFailure
impl UnwindSafe for CredentialFailure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more