{"record":{"id":"94944e5ca2ca044f","repo":"Hmbown/CodeWhale","slug":"failed-to-parse-config-from-file-contents-were","errorCode":null,"errorMessage":"Failed to parse config from {}; file contents were omitted","messagePattern":"Failed to parse config from (.+?); file contents were omitted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config.rs","lineNumber":11778,"sourceCode":"        return codewhale_config::with_xai_oauth_revocation_transaction(|| {\n            clear_active_provider_api_key_unlocked(provider)\n        });\n    }\n    clear_active_provider_api_key_unlocked(provider)\n}\n\nfn clear_active_provider_api_key_unlocked(provider: &str) -> Result<()> {\n    let config_path = credential_config_path()\n        .context(\"Failed to resolve config path while clearing API keys.\")?;\n\n    if config_path.exists() {\n        // `custom` is both the legacy root-shaped route id and a valid exact\n        // `[providers.custom]` table key. Inspect the persisted shape before the\n        // mutation so logout clears exactly one credential scope.\n        let persisted = fs::read_to_string(&config_path)\n            .with_context(|| format!(\"Failed to read config from {}\", config_path.display()))?;\n        let persisted_config: Config = toml::from_str(&persisted).map_err(|_| {\n            anyhow::anyhow!(\n                \"Failed to parse config from {}; file contents were omitted\",\n                codewhale_config::quote_os_path(&config_path)\n            )\n        })?;\n        let exact_literal_custom_table = provider == ApiProvider::Custom.as_str()\n            && persisted_config\n                .providers\n                .as_ref()\n                .and_then(|providers| providers.custom_provider_config(provider))\n                .is_some();\n\n        crate::config_persistence::mutate_config_document(&config_path, |doc| {\n            // The root-level api_key is shared by the legacy DeepSeek and released\n            // literal-custom config shapes. Exact named custom ids remain scoped\n            // to their own table.\n            if matches!(\n                provider,\n                value if value == ApiProvider::Deepseek.as_str()","sourceCodeStart":11760,"sourceCodeEnd":11796,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/config.rs#L11760-L11796","documentation":"Error \"Failed to parse config from {}; file contents were omitted\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/config.rs:11778 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"}