{"record":{"id":"4cceed8816a220f5","repo":"rustfs/rustfs","slug":"connect-credential-data-at-path-is-invalid-sou","errorCode":null,"errorMessage":"connect credential data at {path} is invalid: {source}","messagePattern":"connect credential data at (.+?) is invalid: (.+?)","errorType":"exception","errorClass":"CredentialStoreError","httpStatus":null,"severity":"error","filePath":"rustfs/src/connect/credential_store.rs","lineNumber":99,"sourceCode":"#[serde(rename_all = \"camelCase\")]\npub(crate) struct PendingRotation {\n    pub credential_fingerprint: String,\n    pub device_name: String,\n    pub request_id: String,\n    pub certificate_request: String,\n    pub next_public_key_sha256: String,\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum CredentialStoreError {\n    #[error(\"connect credential store I/O failed at {path}: {source}\")]\n    Io {\n        path: PathBuf,\n        #[source]\n        source: io::Error,\n    },\n\n    #[error(\"connect credential data at {path} is invalid: {source}\")]\n    Invalid {\n        path: PathBuf,\n        #[source]\n        source: serde_json::Error,\n    },\n\n    #[cfg(unix)]\n    #[error(\"connect credential file at {path} has mode {mode:o}, expected {expected:o}\")]\n    Permissions { path: PathBuf, mode: u32, expected: u32 },\n}\n\n#[derive(Clone, Debug)]\npub struct CredentialStore {\n    directory: PathBuf,\n}\n\npub(crate) struct CredentialLock {\n    _file: fs::File,","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/rustfs/rustfs/blob/201c653dcd34c2a01b9aec5991ed76176b342118/rustfs/src/connect/credential_store.rs#L81-L117","documentation":"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.","triggerScenarios":"Thrown at rustfs/src/connect/credential_store.rs:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"201c653dcd34c2a01b9aec5991ed76176b342118","analyzedAt":"2026-08-23T16:57:04.676Z","contentChangedAt":"2026-08-23T16:57:04.676Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}