{"record":{"id":"c86565843a4f4ce7","repo":"Hmbown/CodeWhale","slug":"provider-is-not-a-provider-this-codewhale-account-can","errorCode":null,"errorMessage":"`{provider}` is not a provider this Codewhale account can connect. Known providers: {known}","messagePattern":"`(.+?)` is not a provider this Codewhale account can connect\\. Known providers: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/cloud.rs","lineNumber":1172,"sourceCode":"fn is_ascii_control(character: char) -> bool {\n    character <= '\\u{001f}' || character == '\\u{007f}'\n}\n\n/// Find one catalog row by id, or fail naming what the account does offer.\n///\n/// A catalog miss is the common typo, so the message lists the ids rather than\n/// leaving the user to guess or read a 404.\nfn catalog_row<'a>(catalog: &'a [CatalogProvider], provider: &str) -> Result<&'a CatalogProvider> {\n    catalog\n        .iter()\n        .find(|row| row.id == provider)\n        .ok_or_else(|| {\n            let known = catalog\n                .iter()\n                .map(|row| row.id.as_str())\n                .collect::<Vec<_>>()\n                .join(\", \");\n            anyhow!(\"`{provider}` is not a provider this Codewhale account can connect. Known providers: {known}\")\n        })\n}\n\nfn resolve_local_key(\n    config: &ConfigStore,\n    secrets: &Secrets,\n    kind: ProviderKind,\n) -> Result<Option<String>> {\n    let provider_config = config.config.providers.for_provider(kind);\n    let from_config = provider_config.api_key.clone().or_else(|| {\n        (kind == ProviderKind::Deepseek)\n            .then(|| config.config.api_key.clone())\n            .flatten()\n    });\n    if let Some(value) = from_config\n        .and_then(resolve_config_key_reference)\n        .filter(|value| !value.trim().is_empty())\n    {","sourceCodeStart":1154,"sourceCodeEnd":1190,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/cloud.rs#L1154-L1190","documentation":"The CLI looks up the provider name supplied on the command line in the provider catalog fetched from the Codewhale account. If the name is not present in the catalog, it throws this error listing every known provider id so the developer can correct the name.","triggerScenarios":"Calling a cloud provider-connect command (e.g. `codewhale account providers connect <provider>`) with a provider string that does not exactly match any `row.id` in the account's provider catalog.","commonSituations":"Typo or wrong casing in the provider id; using a provider the account is not provisioned for; an outdated catalog cache after new providers were added.","solutions":["Run the list command (or read the error's `Known providers:` suffix) and use an exact provider id.","Check provider spelling and casing.","Refresh the account catalog (`codewhale account providers list` or re-login) if a newly added provider is missing."],"exampleFix":"// before\ncodewhale account providers connect openai-chat\n// after\ncodewhale account providers connect openai","handlingStrategy":"validation","validationCode":"let known: Vec<&str> = catalog.iter().map(|r| r.id.as_str()).collect();\nif !known.contains(&provider) {\n    eprintln!(\"unknown provider; known: {}\", known.join(\", \"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fetch and cache the provider catalog, then select from it rather than typing ids.","Match ids exactly (case-sensitive).","Re-list providers after account or product changes."],"tags":["cli","provider","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-22T16:17:23.217Z"}