{"record":{"id":"2398bf635767a3f4","repo":"Hmbown/CodeWhale","slug":"refusing-to-import-enabled-false-is-a-ha","errorCode":null,"errorMessage":"Refusing to import '{}': {} (enabled=false is a hard block)","messagePattern":"Refusing to import '(.+?)': (.+?) \\(enabled=false is a hard block\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/tui/ui/provider_routes.rs","lineNumber":748,"sourceCode":"    use std::time::{SystemTime, UNIX_EPOCH};\n\n    let home = crate::config::effective_home_dir().unwrap_or_else(|| PathBuf::from(\".\"));\n    let market_path = codewhale_config::codewhale_home()\n        .ok()\n        .map(|h| h.join(\"mcp-marketplace.json\"));\n    let markets: Vec<PathBuf> = market_path.into_iter().collect();\n    let all = discover_external_sources(&home, workspace, &markets);\n    let candidate = all\n        .iter()\n        .find(|c| c.name.eq_ignore_ascii_case(name))\n        .ok_or_else(|| {\n            anyhow::anyhow!(\n                \"No external MCP candidate named '{name}'. Run /mcp import to list sources with provenance.\"\n            )\n        })?;\n\n    if approve && candidate.hard_blocked {\n        anyhow::bail!(\n            \"Refusing to import '{}': {} (enabled=false is a hard block)\",\n            candidate.name,\n            candidate.block_reason.as_deref().unwrap_or(\"hard blocked\")\n        );\n    }\n\n    let mut decisions = HashMap::new();\n    decisions.insert(\n        candidate.name.clone(),\n        if approve {\n            ImportDecision::Approve\n        } else {\n            ImportDecision::Decline\n        },\n    );\n\n    let mut store = load_consent_store(&mcp_import_consent_path());\n    let now = SystemTime::now()","sourceCodeStart":730,"sourceCodeEnd":766,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tui/ui/provider_routes.rs#L730-L766","documentation":"Raised while importing an external MCP server candidate whose discovered source is disabled (enabled=false). Discovery collects external sources and their enablement state; a disabled source is treated as a hard block, so importing a server from it is refused with the candidate name and the blocking reason interpolated into the message.","triggerScenarios":"Thrown at crates/tui/src/tui/ui/provider_routes.rs:748 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the external MCP source in its configuration, then retry the import","Import the server from a source that is not disabled","Remove the disabled source entry if it is obsolete"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}