#[non_exhaustive]pub enum Error {
Show 74 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,
},
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
StateOnSyncedDrive
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.
CredentialTooLarge
ProgramMissing
CustomOauthEndpoint
StateUnreadable
StateCorrupt
StateFromNewerVersion
StateVersionUnknown
StateNamesUnknownTool
StateWrongMachine
ScheduleUnsupported
ScheduleRefused
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.
ScheduleProgramMissing
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.
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
StateWriteFailed
ClaudeConfigMissing
ClaudeConfigUnreadable
ClaudeConfigNotJson
LiveCredentialAbsent
Fields
tool: ProviderIdLiveCredentialElsewhere
LiveCredentialShapeUnexpected
LiveStoreUnsupported
The tool is configured to keep its login somewhere Pitboard does not handle.
AccountUnknown
NothingParked
ParkedLoginExpired
LiveAccountNotEnrolled
AlreadyEnrolled
LabelTaken
ProviderUnknown
LabelAmbiguous
CannotForgetActiveAccount
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.
ParkSlotExhausted
ParkedCredentialMissing
ParkedCredentialCorrupt
ConfigBackupFailed
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.
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.
IdentityUnverifiable
SignedInAccountChanged
RecoveryUndetermined
SwitchRolledBack
ParkedLoginRefused
ParkedLoginBelongsElsewhere
SwitchDidNotHold
SwitchUnverified
SwitchCorrupted
SignInNotInstalled
Fields
tool: ProviderIdSignInNotKept
RecoveryRecordCorrupt
RecoveryElsewhere
RecoveryFailed
ProgramNotFound
Fields
tool: ProviderIdRenewalFailed
SignInIncomplete
LeftLoginChanged
The file behind the store in use holds something else than what putting it away was confirmed for, or is gone.
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.
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.
LeftLoginUnidentified
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
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.
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.
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.
SystemTooOld
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.
Store(Error)
Lock(LockError)
Implementations§
Source§impl Error
impl Error
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
A stable identifier a program can branch on. Adding one is safe; renaming one is not.
Sourcepub fn cause(&self) -> Option<Cause>
pub fn cause(&self) -> Option<Cause>
What went wrong underneath, where the failure came from a request to Anthropic.
None where nothing was asked.
Sourcepub fn exit_code(&self) -> u8
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 Error for Error
impl Error for Error
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()