{"record":{"id":"a2a27a570c55dc0b","repo":"BoundaryML/baml","slug":"failed-to-fetch-release-metadata-e","errorCode":null,"errorMessage":"Failed to fetch release metadata: {e}","messagePattern":"Failed to fetch release metadata: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/playground-server/src/server.rs","lineNumber":134,"sourceCode":"\n    // Build the GitHub API URL using the version as the release tag\n    let api_url = format!(\"https://api.github.com/repos/{github_repo}/releases/tags/{version}\");\n    tracing::info!(\"Fetching web-panel release metadata from: {}\", api_url);\n\n    // Fetch release metadata with timeout\n    let client = reqwest::Client::builder()\n        .timeout(Duration::from_secs(30))\n        .connect_timeout(Duration::from_secs(10))\n        .build()\n        .map_err(|e| anyhow::anyhow!(\"Failed to create HTTP client: {e}\"))?;\n\n    tracing::info!(\"Sending request to GitHub API...\");\n    let resp = client\n        .get(&api_url)\n        .header(\"User-Agent\", \"baml-playground-server\")\n        .send()\n        .await\n        .map_err(|e| anyhow::anyhow!(\"Failed to fetch release metadata: {e}\"))?;\n\n    tracing::info!(\"Received response with status: {}\", resp.status());\n\n    // Check if the response is successful\n    if !resp.status().is_success() {\n        let status = resp.status();\n        let body = resp\n            .text()\n            .await\n            .unwrap_or_else(|_| \"Failed to read response body\".to_string());\n        return Err(anyhow::anyhow!(\n            \"GitHub API request failed with status {}: {}\",\n            status,\n            body\n        ));\n    }\n\n    tracing::info!(\"Parsing JSON response...\");","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/playground-server/src/server.rs#L116-L152","documentation":"get_playground_dist sends a GET request to the GitHub API to list the latest release. If the request fails at the transport level (DNS failure, connection refused/reset, timeout, TLS error), reqwest's error is wrapped with this message. It means the GitHub metadata request never produced an HTTP response.","triggerScenarios":"client.get(&api_url).send() returns Err — no DNS resolution, network outage, firewall blocking api.github.com, or the 30s request / 10s connect timeout elapsing.","commonSituations":"Running the playground server in an air-gapped or firewalled environment with no access to api.github.com; corporate proxies blocking the request; transient GitHub outages; slow networks tripping the 10s connect timeout; DNS misconfiguration in containers.","solutions":["Verify network access to api.github.com from the host (curl -v https://api.github.com).","Configure proxy support (HTTPS_PROXY env var) if behind a corporate proxy.","Retry after confirming GitHub status (https://www.githubstatus.com) if it is a transient outage or timeout.","Fix DNS in the container/host (check /etc/resolv.conf) if name resolution fails.","Pre-bundle the playground dist so the download path is not needed on machines without internet."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight connectivity check before invoking the server feature\nlet ok = tokio::net::TcpStream::connect(\"api.github.com:443\").await.is_ok();\nif !ok { eprintln!(\"api.github.com unreachable; use bundled dist\"); }","typeGuard":null,"tryCatchPattern":"// retry with backoff on transport errors\nfor attempt in 0..3 {\n    match get_playground_dist().await {\n        Ok(d) => return Ok(d),\n        Err(e) if e.to_string().contains(\"Failed to fetch release metadata\") => {\n            tokio::time::sleep(Duration::from_secs(2u64.pow(attempt))).await;\n        }\n        Err(e) => return Err(e),\n    }\n}","preventionTips":["Ensure outbound HTTPS to api.github.com (proxy/firewall config)","Set HTTPS_PROXY in corporate networks","Bundle the playground dist for offline environments","Monitor GitHub status before deployments"],"tags":["network","github-api","http-client","rust"],"backgroundTag":"network-request-failed","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}