{"record":{"id":"f15543899152300b","repo":"tonhowtf/omniget","slug":"release-de-sem-assets","errorCode":null,"errorMessage":"release de {} sem assets","messagePattern":"release de (.+?) sem assets","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/spicetify.rs","lineNumber":392,"sourceCode":"async fn latest_asset(\n    client: &reqwest::Client,\n    repo: &str,\n    pick: impl Fn(&str) -> bool,\n) -> anyhow::Result<ReleaseAsset> {\n    let url = format!(\"https://api.github.com/repos/{}/releases/latest\", repo);\n    let response = client.get(&url).send().await?;\n    if !response.status().is_success() {\n        return Err(anyhow!(\n            \"nao foi possivel consultar releases de {}: HTTP {}\",\n            repo,\n            response.status()\n        ));\n    }\n    let json: serde_json::Value = response.json().await?;\n    let tag = json[\"tag_name\"].as_str().unwrap_or(\"\").to_string();\n    let assets = json[\"assets\"]\n        .as_array()\n        .ok_or_else(|| anyhow!(\"release de {} sem assets\", repo))?;\n    for asset in assets {\n        let name = asset[\"name\"].as_str().unwrap_or(\"\");\n        if pick(name) {\n            return Ok(ReleaseAsset {\n                tag: tag.clone(),\n                name: name.to_string(),\n                url: asset[\"browser_download_url\"]\n                    .as_str()\n                    .unwrap_or(\"\")\n                    .to_string(),\n                digest: asset[\"digest\"]\n                    .as_str()\n                    .and_then(integrity::parse_github_digest),\n            });\n        }\n    }\n    Err(anyhow!(\n        \"release {} de {} nao tem um asset para este sistema\",","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/spicetify.rs#L374-L410","documentation":"`latest_asset` parsed the latest release JSON but the `assets` field is missing or not an array, so there is nothing to pick from. The library treats a release without an assets array as a hard failure since it cannot download anything.","triggerScenarios":"The latest GitHub release for the repo has no assets, or the API response shape changed (e.g. an error body that still passed the status check).","commonSituations":"A repo published a source-only release (no binaries); a draft or odd release marked latest; GitHub API schema change or a cached/proxied malformed response.","solutions":["Check the latest release page on GitHub for the repo and confirm it has attached binaries","If the latest release is source-only, wait for/pin to a previous release that has assets","Inspect the raw API response (curl https://api.github.com/repos/{repo}/releases/latest) to see the actual shape","Add a GitHub token and re-fetch to rule out a truncated rate-limited response"],"exampleFix":"// before\nlet assets = json[\"assets\"].as_array().ok_or_else(|| anyhow!(\"release de {} sem assets\", repo))?;\n// after\nif json[\"assets\"].as_array().map_or(true, |a| a.is_empty()) {\n    // fall back to listing all releases and picking one with assets\n    return pick_release_with_assets(&client, repo).await;\n}","handlingStrategy":"fallback","validationCode":"let json: serde_json::Value = client.get(url).send().await?.json().await?;\nlet has_assets = json[\"assets\"].as_array().map_or(false, |a| !a.is_empty());\nif !has_assets { eprintln!(\"latest release has no assets; consider older release\"); }","typeGuard":null,"tryCatchPattern":"match latest_asset(&client, repo, pick).await {\n    Err(e) if e.to_string().contains(\"sem assets\") => pick_from_older_releases(&client, repo, pick).await,\n    other => other,\n}","preventionTips":["Fall back to listing `/releases` and picking the newest release that has matching assets","Log the raw JSON when this fires to detect API schema changes early","Prefer repos that consistently publish binaries; check releases page before integrating"],"tags":["github-api","unexpected-response"],"backgroundTag":"unexpected-response-shape","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}