zed-industries/zed · error

request to Cloud failed with status

Error message

request to Cloud failed with status {status}

What it means

user_service::send_request got a non-success HTTP status from the Zed Cloud API (error_for_status failed); the message reports the status code. The Cloud service rejected a user lookup/search request made by the collab server.

Solutions

  1. Check the status: 401/403 suggests expired Cloud credentials, 5xx suggests a Cloud outage
  2. Retry after transient failures; surface the status to operators for diagnosis
  3. Verify the collab server's Cloud API configuration
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/collab/src/services/user_service.rs:91 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at crates/collab/src/services/user_service.rs:91

            .context("failed to build request")?;

        let response = self
            .http_client
            .execute(request)
            .await
            .context("failed to send request to Cloud")?;

        let status = response.status();
        match response.error_for_status() {
            Ok(response) => {
                let response_body: T = response
                    .json()
                    .await
                    .context("failed to parse response body")?;

                Ok(response_body)
            }
            Err(_err) => Err(anyhow!("request to Cloud failed with status {status}",))?,
        }
    }
}

#[async_trait]
impl UserService for CloudUserService {
    async fn get_users_by_ids(&self, ids: Vec<UserId>) -> Result<Vec<User>> {
        let response_body: LookUpUsersByLegacyIdResponse = self
            .send_request(
                self.http_client
                    .post(format!(
                        "{}/internal/users/look_up_by_legacy_id",
                        self.zed_cloud_url
                    ))
                    .json(&LookUpUsersByLegacyIdBody {
                        legacy_user_ids: ids.into_iter().map(|id| id.0).collect(),
                    }),
            )

View on GitHub (pinned to f4178619ac)