{"record":{"id":"cdaeb618a90a08fc","repo":"Hmbown/CodeWhale","slug":"the-codewhale-service-returned-no-connectable-providers","errorCode":null,"errorMessage":"The Codewhale service returned no connectable providers. Check the account API origin, or try again","messagePattern":"The Codewhale service returned no connectable providers\\. Check the account API origin, or try again","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/cloud.rs","lineNumber":491,"sourceCode":"            method: HttpMethod::Get,\n            path: \"/api/model-providers\".to_string(),\n            bearer: None,\n            body: None,\n        })?;\n        let listing: ProviderCatalogResponse = expect_json(response, &[200])?;\n        let mut seen = std::collections::BTreeSet::new();\n        let providers: Vec<CatalogProvider> = listing\n            .providers\n            .into_iter()\n            .filter(|row| validate_provider_id(&row.id).is_ok())\n            .filter(|row| seen.insert(row.id.trim().to_string()))\n            .map(|mut row| {\n                row.id = row.id.trim().to_string();\n                row\n            })\n            .collect();\n        if providers.is_empty() {\n            bail!(\n                \"The Codewhale service returned no connectable providers. Check the account API origin, or try again\"\n            );\n        }\n        Ok(providers)\n    }\n\n    fn logout(&self) -> Result<bool> {\n        let snapshot = self.account_store.snapshot()?;\n        self.account_store\n            .with_transaction(|transaction| -> Result<bool> {\n                if !transaction.matches(&snapshot) {\n                    bail!(\"The signed-in account changed. Refresh and try again.\");\n                }\n                let stored = match transaction.load() {\n                    Ok(Some(stored)) => stored,\n                    Ok(None) | Err(_) => {\n                        transaction.clear();\n                        return Ok(false);","sourceCodeStart":473,"sourceCodeEnd":509,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/cloud.rs#L473-L509","documentation":"provider_catalog fetches the account's connectable providers, trims each row's id, and refuses to return an empty list. An empty catalog means the CLI cannot resolve any provider, so it throws with a hint to check the API origin or retry.","triggerScenarios":"Calling any provider-dependent cloud command when GET of the provider catalog returns zero rows — wrong origin, transient service error, or an account with no providers provisioned.","commonSituations":"Misconfigured account API origin (pointing at the wrong environment); brand-new account with no providers; service outage or degraded response.","solutions":["Verify the account API origin configuration points at the correct Codewhale service.","Retry — the empty result may be transient.","Check the account in the web console or via `codewhale account keys list` to confirm providers exist.","Provision/connect a provider for the account if none exist."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Rust\nmatch cloud.provider_catalog() {\n    Err(e) if e.to_string().contains(\"no connectable providers\") => {\n        // verify origin config, retry, or provision a provider\n    }\n    other => other,\n}","preventionTips":["Validate the account API origin in config before invoking provider commands.","Confirm the account has at least one connectable provider provisioned.","Retry transient service outages before concluding the catalog is empty."],"tags":["cloud","api","empty-result","provider"],"backgroundTag":"empty-result-set","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"}