{"record":{"id":"d6337a96b9f2baed","repo":"zed-industries/zed","slug":"cloud-request-timed-out","errorCode":null,"errorMessage":"Cloud request timed out","messagePattern":"Cloud request timed out","errorType":"exception","errorClass":"CloudRequestTimeoutError","httpStatus":null,"severity":"error","filePath":"crates/edit_prediction/src/edit_prediction.rs","lineNumber":3096,"sourceCode":"            anyhow::ensure!(\n                *app_version >= minimum_required_version,\n                ZedUpdateRequiredError {\n                    minimum_version: minimum_required_version\n                }\n            );\n        }\n\n        if response.status().is_success() {\n            let usage = EditPredictionUsage::from_headers(response.headers()).ok();\n            let mut body = Vec::new();\n            response.body_mut().read_to_end(&mut body).await?;\n            Ok((serde_json::from_slice(&body)?, usage))\n        } else {\n            let status = response.status();\n            let mut body = String::new();\n            response.body_mut().read_to_string(&mut body).await?;\n            if status == http_client::http::StatusCode::REQUEST_TIMEOUT {\n                return Err(anyhow::Error::new(CloudRequestTimeoutError));\n            }\n            anyhow::bail!(\"Request failed with status: {status:?}\\nBody: {body}\");\n        }\n    }\n\n    pub fn refresh_context(\n        &mut self,\n        project: &Entity<Project>,\n        buffer: &Entity<language::Buffer>,\n        cursor_position: language::Anchor,\n        cx: &mut Context<Self>,\n    ) {\n        self.get_or_init_project(project, cx)\n            .context\n            .update(cx, |store, cx| {\n                store.refresh(buffer.clone(), cursor_position, cx);\n            });\n    }","sourceCodeStart":3078,"sourceCodeEnd":3114,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction/src/edit_prediction.rs#L3078-L3114","documentation":"Returned by the edit-prediction cloud request path when the HTTP request exceeds its client-side timeout without a response. It is a timeout sentinel surfaced to the caller so the prediction attempt is abandoned (and may be retried) rather than blocking the editor.","triggerScenarios":"Thrown at crates/edit_prediction/src/edit_prediction.rs:3096 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request, ideally with backoff and jitter","Reduce request payload size or context sent to shorten server processing","Fail over to a local/on-device prediction path if available"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}