{"record":{"id":"b4dae451ffa8334d","repo":"Hmbown/CodeWhale","slug":"doctor-configuration-validation-failed-details-om","errorCode":null,"errorMessage":"doctor configuration validation failed; details omitted because configuration errors may contain credential material","messagePattern":"doctor configuration validation failed; details omitted because configuration errors may contain credential material","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":2237,"sourceCode":"    // first-call-wins; doing this once here keeps every downstream turn\n    // consistent. Missing files are a no-op (bundled defaults). See #3638.\n    crate::prompts::load_prompt_overrides_from_config_home();\n\n    // Plugins own one read-only discovery snapshot per process. Initialize it\n    // before the subcommand match so plain launch, resume, fork, exec, serve,\n    // and every other runtime surface use the same plugin trust decision\n    // (#3916, #4399). Discovery never enables, trusts, executes, or persists a\n    // bundle.\n\n    // Handle subcommands first\n    if let Some(command) = command {\n        return match command {\n            Commands::Doctor(args) => {\n                let config = match load_doctor_config_from_cli(&cli, &args) {\n                    Ok(config) => config,\n                    Err(error) if args.json => return run_doctor_json_config_error(&error),\n                    Err(_) => {\n                        bail!(\n                            \"doctor configuration validation failed; details omitted because configuration errors may contain credential material\"\n                        )\n                    }\n                };\n                let workspace = resolve_workspace(&cli);\n                if args.context_json {\n                    run_doctor_context_json(&config, &workspace)\n                } else if args.json {\n                    run_doctor_json(\n                        &config,\n                        &workspace,\n                        cli.config.as_deref(),\n                        plugin_registry.as_ref(),\n                    )\n                } else {\n                    let probes = crate::doctor::DoctorProbeRequest {\n                        check_updates: args.check_updates,\n                        probe_api: args.probe_api,","sourceCodeStart":2219,"sourceCodeEnd":2255,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L2219-L2255","documentation":"When the `doctor` subcommand cannot load and validate configuration (load_doctor_config_from_cli returns Err) and the invocation is not `--json`, the CLI deliberately bails with a generic message that omits the underlying validation details, because config errors may embed credential material (API keys, tokens). The real details are only surfaced through run_doctor_json_config_error in JSON mode.","triggerScenarios":"Running `codewhale doctor` with a config that fails validation (missing required fields, invalid values, malformed file) without --json.","commonSituations":"Typo'd or missing API key fields, malformed TOML config, schema drift after upgrading Codewhale, or env-sourced credential placeholders that fail validation.","solutions":["Re-run with --json (codewhale doctor --json) to get structured, redacted validation details.","Fix the config field the JSON output reports; common ones are missing provider API keys or invalid model routes.","Validate the config file path you passed via --config; ensure it is the intended file.","If details are truly needed, inspect the config manually but scrub secrets before sharing."],"exampleFix":"// before\ncodewhale doctor\n// after\ncodewhale doctor --json   # prints structured config-validation errors instead of the redacted bail","handlingStrategy":"validation","validationCode":"// shell\ncodewhale doctor --json | jq -e '.config_valid == true' || echo 'fix config before proceeding'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always script against `doctor --json` to get actionable, redacted details.","Keep provider API keys in env/secret store, not inlined in config, to reduce redaction blind spots.","Re-run doctor after every Codewhale upgrade to catch schema drift early."],"tags":["cli","config","validation","secrets"],"backgroundTag":"schema-validation-failed","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"}