Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 81 variants StateOnSyncedDrive { path: PathBuf, marker: String, }, HomeNotAbsolute { variable: &'static str, path: PathBuf, }, 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, }, WarmSettingUnreadable { path: PathBuf, source: Error, }, WarmSettingCorrupt { path: PathBuf, detail: String, }, WarmUpUnsupported { tool: ProviderId, label: String, }, WarmUpFailed { label: String, why: Failure, }, WarmUpNotDue { label: String, why: String, code: &'static str, }, WarmUpHalted { halt: Halt, }, WarmUpInProgress, StateNamesUnknownTool { path: PathBuf, tool: String, }, StateWrongMachine { path: PathBuf, }, ScheduleUnsupported, ScheduleRefused { detail: String, }, ScheduleNotDefaultHome { home: PathBuf, default: PathBuf, }, 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, who: String, }, AlreadyEnrolled { tool: ProviderId, email: String, label: String, }, LabelTaken { label: String, who: String, }, ProviderUnknown { typed: String, known: Vec<String>, }, LabelAmbiguous { label: String, matches: Vec<String>, }, CannotForgetActiveAccount { label: String, }, AccountNotInUse { tool: ProviderId, label: String, }, ParkSlotExhausted, ParkedCredentialMissing { label: String, }, ParkedCredentialCorrupt { label: String, detail: String, }, ConfigBackupFailed { path: PathBuf, source: Error, }, ConfigWriteFailed { path: PathBuf, detail: String, }, SessionExpired { tool: ProviderId, refused: bool, }, 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, who: 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, LeftLoginChanged { path: PathBuf, }, StoredLoginChanged { path: PathBuf, }, LeftLoginNotEnrolled { path: PathBuf, email: String, organization: String, }, LeftLoginUnidentified { path: PathBuf, cause: Cause, detail: String, }, StowStopped { partway: Partway, warnings: Vec<Warning>, error: Box<Error>, }, RenewalLost { tool: ProviderId, error: Box<Error>, }, SignInNotIsolated { reason: String, }, SignInInProgress, Elevated { why: Option<&'static str>, }, SystemTooOld { build: Option<u32>, }, WindowsNotReleased, Usage(String), ConfirmationNeeded { command: &'static str, }, 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
§

HomeNotAbsolute

A home the environment names is empty or relative, so what it leads to would depend on the folder each program runs in. variable is the one that named it.

Fields

§variable: &'static str
§path: PathBuf
§

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
§

WarmSettingUnreadable

Fields

§path: PathBuf
§source: Error
§

WarmSettingCorrupt

Fields

§path: PathBuf
§detail: String
§

WarmUpUnsupported

Fields

§label: String
§

WarmUpFailed

Fields

§label: String
§

WarmUpNotDue

Fields

§label: String
§code: &'static str
§

WarmUpHalted

Fields

§halt: Halt
§

WarmUpInProgress

§

StateNamesUnknownTool

Fields

§path: PathBuf
§tool: String
§

StateWrongMachine

Fields

§path: PathBuf
§

ScheduleUnsupported

§

ScheduleRefused

Fields

§detail: String
§

ScheduleNotDefaultHome

The schedule renews the default home alone, so it is installed only where PITBOARD_HOME names that home or nothing. home is the directory it names, and default the default home, ~/.pitboard.

Fields

§home: PathBuf
§default: PathBuf
§

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

§

AlreadyEnrolled

Fields

§email: String
§label: String
§

LabelTaken

Fields

§label: String
§

ProviderUnknown

Fields

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

LabelAmbiguous

Fields

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

CannotForgetActiveAccount

Fields

§label: String
§

AccountNotInUse

Asked to write an account into its tool’s config as the one in use, once another account’s login is stored, as after a switch made since somebody asked.

Fields

§label: String
§

ParkSlotExhausted

§

ParkedCredentialMissing

Fields

§label: String
§

ParkedCredentialCorrupt

Fields

§label: String
§detail: String
§

ConfigBackupFailed

Fields

§path: PathBuf
§source: Error
§

ConfigWriteFailed

Claude Code fetches its profile again only once the config’s is a day old (the register’s config_identity_is_the_last_writers), so this does not correct itself sooner.

Fields

§path: PathBuf
§detail: String
§

SessionExpired

The service refused the login’s access token as expired. refused where Pitboard tried to renew the login and its service refuses its refresh token for good, or it has none, so only signing in again mends it.

Fields

§refused: bool
§

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
§

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

§

LeftLoginChanged

The file behind the store in use holds something else than what putting it away was confirmed for, or is gone.

Fields

§path: PathBuf
§

StoredLoginChanged

The login stored changed before the file behind it could go, where it was going because of that login: the file held that very login, or another of the same account.

Fields

§path: PathBuf
§

LeftLoginNotEnrolled

The login left in the file is an account’s nobody enrolled, so there is no account to keep it for, and deleting the file would lose it.

Fields

§path: PathBuf
§email: String
§organization: String
§

LeftLoginUnidentified

Fields

§path: PathBuf
§cause: Cause
§detail: String
§

StowStopped

What stopped putting away the file behind a tool’s store, said with how far that had gone, which is never as far as deleting the file. Its code, cause and exit status are error’s, so a program branches on what stopped it.

Fields

§partway: Partway
§warnings: Vec<Warning>

What parking the login warned about, where it was parked first. Taken out by the service and reported beside the error.

§error: Box<Error>
§

RenewalLost

What stopped Pitboard saving a login of a tool’s own it had just renewed, where no copy of the renewed login could be kept either, so the refresh token the tool’s store holds is spent. Its code, cause and exit status are error’s.

Fields

§error: Box<Error>
§

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

§

Elevated

This process runs as root or under sudo, or elevated on Windows, or the system could not say whether it does, so Pitboard changes nothing: the one gate every change passes refused it. why is how it runs, as the host said it, and None where the host could not say.

Fields

§why: Option<&'static str>
§

SystemTooOld

Fields

§build: Option<u32>
§

WindowsNotReleased

This is a Windows build of a release made before Pitboard for Windows is released, so it does nothing (crate::release). Kept once Windows is released, where it never occurs.

§

Usage(String)

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

§

ConfirmationNeeded

A command that deletes something was run with nobody to ask, without --yes.

Fields

§command: &'static str
§

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>

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

1 when a request could not be met; 2 when the command line was wrong, or lacks the --yes a command that deletes needs with nobody to ask; 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.

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.