#[non_exhaustive]pub enum Cause {
Unreachable,
RateLimited,
ServerError,
Refused,
AnswerNotUnderstood,
LoginRefused,
TokenExpired,
}Expand description
Why a request to Anthropic did not produce an answer Pitboard could use.
The code on an error says what Pitboard was doing; this says what went wrong underneath it, and whether trying again is worth anything. Without it every failure that was not a 401 arrived at a front end as one code with a sentence of prose, so neither the command line nor the app could tell being offline from being rate limited from a login Anthropic has finished with.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unreachable
Anthropic could not be reached at all.
RateLimited
Anthropic asked for less traffic.
ServerError
Anthropic answered, badly, and may answer well later.
Refused
Anthropic refused the request, and asked again would refuse it the same way.
AnswerNotUnderstood
Anthropic answered something Pitboard does not understand, which means its shape moved. Trying again will produce the same thing.
LoginRefused
This login is finished: revoked, or already used somewhere else.
TokenExpired
The token has expired. For the signed-in login that is ordinary and Claude Code renews it; for a parked one it means the park needs renewing first.
Implementations§
Trait Implementations§
impl Copy for Cause
impl Eq for Cause
impl StructuralPartialEq for Cause
Auto Trait Implementations§
impl Freeze for Cause
impl RefUnwindSafe for Cause
impl Send for Cause
impl Sync for Cause
impl Unpin for Cause
impl UnsafeUnpin for Cause
impl UnwindSafe for Cause
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
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.