zed-industries/zed · error · CloudRequestTimeoutError

Cloud request timed out

Error message

Cloud request timed out

What it means

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.

Source

Thrown at crates/edit_prediction/src/edit_prediction.rs:3096

            anyhow::ensure!(
                *app_version >= minimum_required_version,
                ZedUpdateRequiredError {
                    minimum_version: minimum_required_version
                }
            );
        }

        if response.status().is_success() {
            let usage = EditPredictionUsage::from_headers(response.headers()).ok();
            let mut body = Vec::new();
            response.body_mut().read_to_end(&mut body).await?;
            Ok((serde_json::from_slice(&body)?, usage))
        } else {
            let status = response.status();
            let mut body = String::new();
            response.body_mut().read_to_string(&mut body).await?;
            if status == http_client::http::StatusCode::REQUEST_TIMEOUT {
                return Err(anyhow::Error::new(CloudRequestTimeoutError));
            }
            anyhow::bail!("Request failed with status: {status:?}\nBody: {body}");
        }
    }

    pub fn refresh_context(
        &mut self,
        project: &Entity<Project>,
        buffer: &Entity<language::Buffer>,
        cursor_position: language::Anchor,
        cx: &mut Context<Self>,
    ) {
        self.get_or_init_project(project, cx)
            .context
            .update(cx, |store, cx| {
                store.refresh(buffer.clone(), cursor_position, cx);
            });
    }

View on GitHub (pinned to f4178619ac)

Solutions

  1. Retry the request, ideally with backoff and jitter
  2. Reduce request payload size or context sent to shorten server processing
  3. Fail over to a local/on-device prediction path if available
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/edit_prediction/src/edit_prediction.rs:3096 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/d6337a96b9f2baed. Report an issue: GitHub.