#[non_exhaustive]pub enum ClaudeCodeAuthError {
CredentialsMissing {
path: String,
},
OAuthSectionMissing {
path: String,
},
RefreshTokenMissing,
RefreshHttp {
message: String,
},
InvalidStorage {
path: String,
source: Error,
},
Io {
path: String,
source: Error,
},
HomeUnresolved,
}Expand description
Failure modes specific to Claude Code OAuth credential resolution.
Each variant maps onto a entelix_core::auth::AuthError when
surfaced through the entelix_core::auth::CredentialProvider
trait.
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.
CredentialsMissing
The credential file is absent — typically the operator hasn’t
run claude login yet.
OAuthSectionMissing
The credential file exists but contains no OAuth section.
RefreshTokenMissing
The OAuth credential payload had no refresh_token — the
access token is expired and cannot be renewed.
RefreshHttp
The token-refresh HTTP call failed.
InvalidStorage
The credential file failed to parse as JSON.
Fields
Io
Filesystem error reading or writing the credential file.
HomeUnresolved
HOME (or platform equivalent) is unset, so the default
~/.claude/.credentials.json location cannot be resolved.
Trait Implementations§
Source§impl Debug for ClaudeCodeAuthError
impl Debug for ClaudeCodeAuthError
Source§impl Display for ClaudeCodeAuthError
impl Display for ClaudeCodeAuthError
Source§impl Error for ClaudeCodeAuthError
impl Error for ClaudeCodeAuthError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ClaudeCodeAuthError> for Error
impl From<ClaudeCodeAuthError> for Error
Source§fn from(err: ClaudeCodeAuthError) -> Self
fn from(err: ClaudeCodeAuthError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClaudeCodeAuthError
impl !RefUnwindSafe for ClaudeCodeAuthError
impl Send for ClaudeCodeAuthError
impl Sync for ClaudeCodeAuthError
impl Unpin for ClaudeCodeAuthError
impl UnsafeUnpin for ClaudeCodeAuthError
impl !UnwindSafe for ClaudeCodeAuthError
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
Mutably borrows from an owned value. Read more