{"record":{"id":"19906624c9a344c2","repo":"Hmbown/CodeWhale","slug":"failed-to-delete-stored-credentials-for","errorCode":null,"errorMessage":"failed to delete stored credentials for: {}","messagePattern":"failed to delete stored credentials for: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config.rs","lineNumber":11710,"sourceCode":"            \"credential.clear\",\n            json!({\n                \"backend\": \"config_file\",\n                \"config_path\": config_path.display().to_string(),\n                \"scope\": \"root_and_provider_keys\",\n            }),\n        );\n    }\n\n    // The config scrub alone leaves the durable secret-store credential\n    // alive, and the read chain prefers the secret store over the file, so a\n    // \"cleared\" key silently came back on the next launch (#5196). Delete\n    // every provider slot too, symmetric with CLI logout (#5159). This runs\n    // even when the config file is absent: the slot survives independently\n    // of the file.\n    if let Some(secrets) = credential_secret_store() {\n        let failures = clear_all_provider_api_keys_from_secret_store(&secrets);\n        if !failures.is_empty() {\n            anyhow::bail!(\n                \"failed to delete stored credentials for: {}\",\n                failures.join(\", \")\n            );\n        }\n    }\n\n    Ok(())\n}\n\n/// Delete the credential slot of every provider that has one stored.\n///\n/// Mirrors the CLI logout helper (#5159): each slot is probed first so\n/// backends that error on deleting a missing item stay quiet, slots shared\n/// by several providers (e.g. the historical `siliconflow` slot) are deleted\n/// once, and every deletion failure is returned as a human-readable entry so\n/// the caller can fail loudly instead of claiming a clean logout while\n/// credentials linger in the store (#5196).\nfn clear_all_provider_api_keys_from_secret_store(","sourceCodeStart":11692,"sourceCodeEnd":11728,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/config.rs#L11692-L11728","documentation":"Error \"failed to delete stored credentials for: {}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/config.rs:11710 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}