{"record":{"id":"367c21b4890e6abb","repo":"denoland/deno","slug":"empty-response-from-url","errorCode":null,"errorMessage":"empty response from {url}","messagePattern":"empty response from (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":1960,"sourceCode":"    let url = Url::parse(&laufey_release_url(&archive))?;\n    let progress_bar = ProgressBar::new(ProgressBarStyle::DownloadBars);\n    let progress = progress_bar.update(&archive);\n    // Send a real User-Agent — some CDNs (incl. parts of GitHub\n    // releases) start rate-limiting empty UAs aggressively.\n    let mut headers = http::HeaderMap::new();\n    if let Ok(ua) = http::HeaderValue::from_str(&format!(\n      \"deno-desktop/{} (+https://deno.com)\",\n      env!(\"CARGO_PKG_VERSION\")\n    )) {\n      headers.insert(http::header::USER_AGENT, ua);\n    }\n    let response = client\n      .download_with_progress_and_retries(url.clone(), &headers, &progress)\n      .await\n      .with_context(|| format!(\"failed to download {url}\"))?;\n    let data = response\n      .into_maybe_bytes()?\n      .ok_or_else(|| deno_core::anyhow::anyhow!(\"empty response from {url}\"))?;\n\n    let actual =\n      faster_hex::hex_string(&sha2::Sha256::digest(&data)).to_lowercase();\n    let expected_lc = expected.to_lowercase();\n    if actual != expected_lc {\n      // Include the URL in the bail: an attacker who poisoned a redirect\n      // would otherwise be invisible in the failure log.\n      bail!(\n        \"checksum mismatch for {archive} (downloaded from {url})\\n  expected: {expected_lc}\\n  actual:   {actual}\"\n      );\n    }\n\n    let parent = dir.parent().ok_or_else(|| {\n      deno_core::anyhow::anyhow!(\n        \"LAUFEY cache dir has no parent: {}\",\n        dir.display()\n      )\n    })?;","sourceCodeStart":1942,"sourceCodeEnd":1978,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/desktop.rs#L1942-L1978","documentation":"Error \"empty response from {url}\" thrown in denoland/deno.","triggerScenarios":"Thrown at cli/tools/desktop.rs:1960 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}