{"record":{"id":"74eb68eb170fcf92","repo":"Hmbown/CodeWhale","slug":"failed-to-list-models-reason","errorCode":null,"errorMessage":"Failed to list models: {reason:?}","messagePattern":"Failed to list models: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/client.rs","lineNumber":898,"sourceCode":"    timeout: NON_STREAMING_HTTP_TIMEOUT,\n};\n\n#[derive(Clone, Copy)]\nenum ModelsRequestMode {\n    Interactive,\n    Refresh,\n}\n\n#[derive(Debug)]\nenum ModelsFetchError {\n    Catalog(CatalogRefreshError),\n    Interactive(anyhow::Error),\n}\n\nimpl ModelsFetchError {\n    fn into_interactive(self) -> anyhow::Error {\n        match self {\n            Self::Catalog(reason) => anyhow::anyhow!(\"Failed to list models: {reason:?}\"),\n            Self::Interactive(error) => error,\n        }\n    }\n\n    fn into_catalog(self) -> CatalogRefreshError {\n        match self {\n            Self::Catalog(reason) => reason,\n            Self::Interactive(_) => CatalogRefreshError::Network,\n        }\n    }\n}\n\nimpl From<CatalogRefreshError> for ModelsFetchError {\n    fn from(reason: CatalogRefreshError) -> Self {\n        Self::Catalog(reason)\n    }\n}\n","sourceCodeStart":880,"sourceCodeEnd":916,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/client.rs#L880-L916","documentation":"Interactive model listing converts a catalog refresh failure into a user-facing error; the debug-formatted reason distinguishes catalog-level failures (auth, network, provider errors) from ordinary interactive request failures.","triggerScenarios":"Thrown at crates/tui/src/client.rs:898 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the CatalogRefreshError debug payload in the message to see whether the catalog fetch or its parsing failed.","Retry after fixing connectivity/credentials; the interactive model list falls back only when this error is converted."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}