{"record":{"id":"978bac8c13b89460","repo":"Hmbown/CodeWhale","slug":"external-credential-consent-cancelled-no-configur","errorCode":null,"errorMessage":"external credential consent cancelled; no configuration was changed","messagePattern":"external credential consent cancelled; no configuration was changed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/cli/src/lib.rs","lineNumber":4350,"sourceCode":"        bail!(\n            \"external credential consent was not saved: non-interactive use requires explicit --yes after reviewing the preview\"\n        );\n    }\n    confirm_external_consent_answer(&mut std::io::stdin().lock(), &mut std::io::stdout().lock())\n}\n\nfn confirm_external_consent_answer(\n    reader: &mut impl std::io::BufRead,\n    writer: &mut impl std::io::Write,\n) -> Result<()> {\n    write!(writer, \"Type 'yes' to grant this exact read-only access: \")?;\n    writer.flush()?;\n    let mut answer = String::new();\n    reader\n        .read_line(&mut answer)\n        .context(\"reading external credential consent confirmation\")?;\n    if answer.trim() != \"yes\" {\n        bail!(\"external credential consent cancelled; no configuration was changed\");\n    }\n    Ok(())\n}\n\nfn yes_no(b: bool) -> &'static str {\n    if b { \"yes\" } else { \"no \" }\n}\n\nfn keyring_status_short(state: Option<bool>) -> &'static str {\n    match state {\n        Some(true) => \"yes\",\n        Some(false) => \"no \",\n        None => \"n/a\",\n    }\n}\n\nfn prompt_api_key(slot: &str) -> Result<String> {\n    use std::io::{IsTerminal, Write};","sourceCodeStart":4332,"sourceCodeEnd":4368,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L4332-L4368","documentation":"The interactive consent prompt reads a line from the user; anything other than the exact string `yes` (after trimming) aborts the flow, guaranteeing no configuration change occurs. This is a deliberate user-initiated cancellation, not an internal fault.","triggerScenarios":"Answering the external-credential consent prompt with `no`, `y`, an empty line, EOF, or any input other than `yes`.","commonSituations":"Users typing `y` or Enter expecting acceptance; pressing Ctrl-D (EOF leaves answer empty); changed mind after reviewing the preview.","solutions":["Re-run the command and answer exactly `yes` to save consent","If declining was intended, no action is needed — configuration is unchanged"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { saveExternalConsent(provider) } catch (e) { if (String(e).includes('consent cancelled')) { log('user declined; no changes made'); return; } throw e; }","preventionTips":["Read the preview carefully and answer exactly `yes` to accept","In automation, prefer --yes over piping answers to the prompt"],"tags":["cli","consent","user-input","cancelled"],"backgroundTag":"user-input-validation","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}