{"record":{"id":"764b26d5c6edc2f8","repo":"zed-industries/zed","slug":"error-deserializing-github-release-err","errorCode":null,"errorMessage":"error deserializing GitHub release: {err:?}","messagePattern":"error deserializing GitHub release: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/http_client/src/github.rs","lineNumber":129,"sourceCode":"        .read_to_end(&mut body)\n        .await\n        .context(\"error reading latest release\")?;\n\n    if status.is_client_error() {\n        let text = String::from_utf8_lossy(body.as_slice());\n        bail!(\n            \"status error {}, response: {text:?}\",\n            response.status().as_u16()\n        );\n    }\n\n    let release = serde_json::from_slice::<GithubRelease>(body.as_slice()).map_err(|err| {\n        log::error!(\"Error deserializing: {err:?}\");\n        log::error!(\n            \"GitHub API response text: {:?}\",\n            String::from_utf8_lossy(body.as_slice())\n        );\n        anyhow!(\"error deserializing GitHub release: {err:?}\")\n    })?;\n\n    Ok(release)\n}\n\nfn github_api_request(url: &str) -> Result<Request<AsyncBody>> {\n    Request::get(url)\n        .follow_redirects(crate::RedirectPolicy::FollowAll)\n        .timeout(GITHUB_RELEASE_REQUEST_TIMEOUT)\n        .when_some(std::env::var(\"GITHUB_TOKEN\").ok(), |builder, token| {\n            builder.header(\"Authorization\", format!(\"Bearer {}\", token))\n        })\n        .body(Default::default())\n        .map_err(Into::into)\n}\n\n#[derive(Debug, PartialEq, Eq, Clone, Copy)]\npub enum AssetKind {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/http_client/src/github.rs#L111-L147","documentation":"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.","triggerScenarios":"Thrown at crates/http_client/src/github.rs:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the full response text logged at error level to see what GitHub actually returned before assuming a code bug","Verify the requested tag/URL points to a real GitHub release endpoint","Update the GithubRelease struct to match GitHub's current REST API schema if fields changed","Retry later if GitHub was returning a transient error body with a 2xx/5xx status"],"exampleFix":null,"handlingStrategy":"fallback","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-14T00:17:10.932Z"}