zed-industries/zed · error

error deserializing GitHub release: {err:?}

Error message

error deserializing GitHub release: {err:?}

What it means

Fires in get_release_by_tag_name after a successful (non-client-error) GitHub API response whose body could not be parsed into a GithubRelease via serde_json. The HTTP call succeeded, but the payload is not the expected release JSON shape — typically because the tag resolved to an unexpected resource, GitHub returned a non-release JSON envelope (e.g. rate-limit or error body with a non-4xx status), or the GithubRelease struct no longer matches GitHub's current API schema.

Source

Thrown at crates/http_client/src/github.rs:129

        .read_to_end(&mut body)
        .await
        .context("error reading latest release")?;

    if status.is_client_error() {
        let text = String::from_utf8_lossy(body.as_slice());
        bail!(
            "status error {}, response: {text:?}",
            response.status().as_u16()
        );
    }

    let release = serde_json::from_slice::<GithubRelease>(body.as_slice()).map_err(|err| {
        log::error!("Error deserializing: {err:?}");
        log::error!(
            "GitHub API response text: {:?}",
            String::from_utf8_lossy(body.as_slice())
        );
        anyhow!("error deserializing GitHub release: {err:?}")
    })?;

    Ok(release)
}

fn github_api_request(url: &str) -> Result<Request<AsyncBody>> {
    Request::get(url)
        .follow_redirects(crate::RedirectPolicy::FollowAll)
        .timeout(GITHUB_RELEASE_REQUEST_TIMEOUT)
        .when_some(std::env::var("GITHUB_TOKEN").ok(), |builder, token| {
            builder.header("Authorization", format!("Bearer {}", token))
        })
        .body(Default::default())
        .map_err(Into::into)
}

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum AssetKind {

View on GitHub (pinned to f4178619ac)

Solutions

  1. Check the full response text logged at error level to see what GitHub actually returned before assuming a code bug
  2. Verify the requested tag/URL points to a real GitHub release endpoint
  3. Update the GithubRelease struct to match GitHub's current REST API schema if fields changed
  4. Retry later if GitHub was returning a transient error body with a 2xx/5xx status
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/http_client/src/github.rs:129 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/764b26d5c6edc2f8. Report an issue: GitHub.