Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 61 variants StateOnSyncedDrive { path: PathBuf, marker: String, }, CredentialTooLarge { tool: ProviderId, label: String, bytes: usize, limit: usize, }, ProgramMissing { tool: ProviderId, program: String, }, CustomOauthEndpoint, StateUnreadable { path: PathBuf, source: Error, }, StateCorrupt { path: PathBuf, source: Error, }, StateFromNewerVersion { path: PathBuf, found: u32, expected: u32, }, StateVersionUnknown { path: PathBuf, found: u32, }, StateNamesUnknownTool { path: PathBuf, tool: String, }, StateWrongMachine { path: PathBuf, }, ScheduleUnsupported, ScheduleRefused { detail: String, }, ScheduleProgramMissing { path: PathBuf, }, ScheduleProgramTemporary { path: PathBuf, }, ScheduleProgramUnnamed, HomeUnwritable { path: PathBuf, source: Error, }, StateWriteFailed { path: PathBuf, source: Error, }, ClaudeConfigMissing { path: PathBuf, }, ClaudeConfigUnreadable { path: PathBuf, source: Error, }, ClaudeConfigNotJson { path: PathBuf, source: Error, }, LiveCredentialAbsent { tool: ProviderId, }, LiveCredentialElsewhere { email: String, }, LiveCredentialShapeUnexpected { tool: ProviderId, detail: String, }, LiveStoreUnsupported { tool: ProviderId, reason: String, }, AccountUnknown { label: String, enrolled: Enrolled, }, NothingParked { tool: ProviderId, label: String, }, ParkedLoginExpired { label: String, }, LiveAccountNotEnrolled { tool: ProviderId, email: String, }, AlreadyEnrolled { tool: ProviderId, email: String, label: String, }, LabelTaken { label: String, email: String, }, ProviderUnknown { typed: String, known: Vec<String>, }, LabelAmbiguous { label: String, matches: Vec<String>, }, CannotForgetActiveAccount { label: String, }, ParkSlotExhausted, ParkedCredentialMissing { label: String, }, ParkedCredentialCorrupt { label: String, detail: String, }, ConfigBackupFailed { path: PathBuf, source: Error, }, ConfigWriteFailed { path: PathBuf, detail: String, }, SessionExpired { tool: ProviderId, }, IdentityUnverifiable { tool: ProviderId, cause: Cause, detail: String, }, SignedInAccountChanged, RecoveryUndetermined { tool: ProviderId, from: String, to: String, detail: String, }, SwitchRolledBack { from: String, to: String, detail: String, }, ParkedLoginRefused { tool: ProviderId, label: String, }, ParkedLoginBelongsElsewhere { label: String, email: String, }, SwitchDidNotHold { tool: ProviderId, from: String, to: String, }, SwitchUnverified { tool: ProviderId, from: String, to: String, detail: String, }, SwitchCorrupted { tool: ProviderId, from: String, to: String, detail: String, }, SignInNotInstalled { tool: ProviderId, label: String, detail: String, parked: bool, warnings: Vec<Warning>, }, SignInNotKept { tool: ProviderId, label: String, detail: String, }, RecoveryRecordCorrupt { path: PathBuf, source: Error, }, RecoveryElsewhere { tool: ProviderId, from: String, to: String, slot: String, }, RecoveryFailed { path: PathBuf, source: Error, }, ProgramNotFound { tool: ProviderId, }, RenewalFailed { label: String, cause: Option<Cause>, detail: String, }, SignInIncomplete, SignInNotIsolated { reason: String, }, SignInInProgress, Usage(String), Store(Error), Lock(LockError),
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

StateOnSyncedDrive

Fields

§path: PathBuf
§marker: String
§

CredentialTooLarge

Fields

§label: String
§bytes: usize
§limit: usize
§

ProgramMissing

Fields

§program: String
§

CustomOauthEndpoint

§

StateUnreadable

Fields

§path: PathBuf
§source: Error
§

StateCorrupt

Fields

§path: PathBuf
§source: Error
§

StateFromNewerVersion

Fields

§path: PathBuf
§found: u32
§expected: u32
§

StateVersionUnknown

Fields

§path: PathBuf
§found: u32
§

StateNamesUnknownTool

Fields

§path: PathBuf
§tool: String
§

StateWrongMachine

Fields

§path: PathBuf
§

ScheduleUnsupported

§

ScheduleRefused

Fields

§detail: String
§

ScheduleProgramMissing

Fields

§path: PathBuf
§

ScheduleProgramTemporary

macOS runs an app opened where it was downloaded from a copy it makes somewhere temporary, which is there while the app runs and gone once it quits.

Fields

§path: PathBuf
§

ScheduleProgramUnnamed

An app that names no command line for the schedule, where the only other thing to schedule is the app itself, which renews nothing.

§

HomeUnwritable

Fields

§path: PathBuf
§source: Error
§

StateWriteFailed

Fields

§path: PathBuf
§source: Error
§

ClaudeConfigMissing

Fields

§path: PathBuf
§

ClaudeConfigUnreadable

Fields

§path: PathBuf
§source: Error
§

ClaudeConfigNotJson

Fields

§path: PathBuf
§source: Error
§

LiveCredentialAbsent

Fields

§

LiveCredentialElsewhere

Fields

§email: String
§

LiveCredentialShapeUnexpected

Fields

§detail: String
§

LiveStoreUnsupported

The tool is configured to keep its login somewhere pitboard does not handle.

Fields

§reason: String
§

AccountUnknown

Fields

§label: String
§enrolled: Enrolled

The labels that do exist, so a typo costs no second command.

§

NothingParked

Fields

§label: String
§

ParkedLoginExpired

Fields

§label: String
§

LiveAccountNotEnrolled

Fields

§email: String
§

AlreadyEnrolled

Fields

§email: String
§label: String
§

LabelTaken

Fields

§label: String
§email: String
§

ProviderUnknown

Fields

§typed: String
§known: Vec<String>
§

LabelAmbiguous

Fields

§label: String
§matches: Vec<String>
§

CannotForgetActiveAccount

Fields

§label: String
§

ParkSlotExhausted

§

ParkedCredentialMissing

Fields

§label: String
§

ParkedCredentialCorrupt

Fields

§label: String
§detail: String
§

ConfigBackupFailed

Fields

§path: PathBuf
§source: Error
§

ConfigWriteFailed

Claude Code refetches its profile only once a day, so this does not correct itself.

Fields

§path: PathBuf
§detail: String
§

SessionExpired

Fields

§

IdentityUnverifiable

Fields

§cause: Cause
§detail: String
§

SignedInAccountChanged

§

RecoveryUndetermined

Fields

§from: String
§detail: String
§

SwitchRolledBack

Fields

§from: String
§detail: String
§

ParkedLoginRefused

Fields

§label: String
§

ParkedLoginBelongsElsewhere

Fields

§label: String
§email: String
§

SwitchDidNotHold

Fields

§from: String
§

SwitchUnverified

Fields

§from: String
§detail: String
§

SwitchCorrupted

Fields

§from: String
§detail: String
§

SignInNotInstalled

Fields

§label: String
§detail: String
§parked: bool

Whether the new login was parked instead, which keeps the one copy of it.

§warnings: Vec<Warning>

What writing it and parking it warned about, which is still true of a change that failed afterwards. Taken out by the service and reported beside the error.

§

SignInNotKept

Fields

§label: String
§detail: String
§

RecoveryRecordCorrupt

Fields

§path: PathBuf
§source: Error
§

RecoveryElsewhere

Fields

§from: String
§slot: String
§

RecoveryFailed

Fields

§path: PathBuf
§source: Error
§

ProgramNotFound

Fields

§

RenewalFailed

Fields

§label: String
§cause: Option<Cause>
§detail: String
§

SignInIncomplete

§

SignInNotIsolated

Signing in to a second account works by pointing the tool’s own login at a scratch directory. Where that does not isolate it from the live login, running one would write over the account somebody is using, so pitboard will not.

Fields

§reason: String
§

SignInInProgress

§

Usage(String)

The command line itself was wrong; the message is clap’s.

§

Store(Error)

§

Lock(LockError)

Implementations§

Source§

impl Error

Source

pub fn code(&self) -> &'static str

A stable identifier a program can branch on. Adding one is safe; renaming one is not.

Source

pub fn cause(&self) -> Option<Cause>

1 when a request could not be met; 2 when the command line was wrong; 3 when a login or Claude Code’s files are in a state pitboard cannot safely act on: an unexpected format, or a login that could not be put back. What went wrong underneath, where the failure came from a request to Anthropic. None where nothing was asked.

Source

pub fn exit_code(&self) -> u8

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.