#[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
StateOnSyncedDrive
CredentialTooLarge
ProgramMissing
CustomOauthEndpoint
StateUnreadable
StateCorrupt
StateFromNewerVersion
StateVersionUnknown
StateNamesUnknownTool
StateWrongMachine
ScheduleUnsupported
ScheduleRefused
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
ParkSlotExhausted
ParkedCredentialMissing
ParkedCredentialCorrupt
ConfigBackupFailed
ConfigWriteFailed
Claude Code refetches its profile only once a day, so this does not correct itself.
SessionExpired
Fields
tool: ProviderIdIdentityUnverifiable
SignedInAccountChanged
RecoveryUndetermined
SwitchRolledBack
ParkedLoginRefused
ParkedLoginBelongsElsewhere
SwitchDidNotHold
SwitchUnverified
SwitchCorrupted
SignInNotInstalled
Fields
tool: ProviderIdSignInNotKept
RecoveryRecordCorrupt
RecoveryElsewhere
RecoveryFailed
ProgramNotFound
Fields
tool: ProviderIdRenewalFailed
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.
SignInInProgress
Usage(String)
The command line itself was wrong; the message is clap’s.
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>
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.
pub fn exit_code(&self) -> u8
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()