rustfs/rustfs · error · CredentialStoreError
connect credential data at {path} is invalid: {source}
Error message
connect credential data at {path} is invalid: {source} What it means
CredentialStoreError::Invalid fires when the credential file at the given path parses as bytes but fails JSON deserialization — the stored credential document is corrupt or was written by an incompatible version. The serde error is chained as source.
Source
Thrown at rustfs/src/connect/credential_store.rs:99
#[serde(rename_all = "camelCase")]
pub(crate) struct PendingRotation {
pub credential_fingerprint: String,
pub device_name: String,
pub request_id: String,
pub certificate_request: String,
pub next_public_key_sha256: String,
}
#[derive(Debug, thiserror::Error)]
pub enum CredentialStoreError {
#[error("connect credential store I/O failed at {path}: {source}")]
Io {
path: PathBuf,
#[source]
source: io::Error,
},
#[error("connect credential data at {path} is invalid: {source}")]
Invalid {
path: PathBuf,
#[source]
source: serde_json::Error,
},
#[cfg(unix)]
#[error("connect credential file at {path} has mode {mode:o}, expected {expected:o}")]
Permissions { path: PathBuf, mode: u32, expected: u32 },
}
#[derive(Clone, Debug)]
pub struct CredentialStore {
directory: PathBuf,
}
pub(crate) struct CredentialLock {
_file: fs::File,View on GitHub (pinned to 201c653dcd)
Solutions
- Restore the credential file from backup
- Re-enroll with Connect to regenerate valid credential state
- Check for version skew between the writer and reader of the state file
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at rustfs/src/connect/credential_store.rs:99 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rustfs/rustfs@201c653dcd (2026-08-23).
Data as JSON: /api/errors/4cceed8816a220f5.
Report an issue: GitHub.