{"record":{"id":"3a88fb50149c32eb","repo":"tonhowtf/omniget","slug":"access-token-not-available-for-clip-mod","errorCode":null,"errorMessage":"Access token not available for clip: {}","messagePattern":"Access token not available for clip: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/twitch/mod.rs","lineNumber":232,"sourceCode":"            .header(\"client-id\", CLIENT_ID)\n            .json(&body)\n            .send()\n            .await?;\n\n        if !response.status().is_success() {\n            return Err(anyhow!(\n                \"Twitch GQL token retornou HTTP {}\",\n                response.status()\n            ));\n        }\n\n        let json: serde_json::Value = response.json().await?;\n\n        let token_obj = json\n            .as_array()\n            .and_then(|arr| arr.first())\n            .and_then(|r| r.pointer(\"/data/clip/playbackAccessToken\"))\n            .ok_or_else(|| anyhow!(\"Access token not available for clip: {}\", slug))?;\n\n        let signature = token_obj\n            .get(\"signature\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow!(\"Token sem signature\"))?\n            .to_string();\n\n        let value = token_obj\n            .get(\"value\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow!(\"Token sem value\"))?\n            .to_string();\n\n        Ok(AccessToken { signature, value })\n    }\n\n    fn build_authenticated_url(source_url: &str, token: &AccessToken) -> String {\n        format!(","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/twitch/mod.rs#L214-L250","documentation":"The token GQL response parsed as JSON but the first element's /data/clip/playbackAccessToken pointer is missing or null: Twitch did not hand out a playback token for this slug. Usually the clip is unavailable in the requesting region or was removed, so the Usher playlist URL cannot be built; the {} is the slug.","triggerScenarios":"Thrown at src-tauri/src/platforms/twitch/mod.rs:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the clip still exists and plays on twitch.tv","Try from a different region/network if the clip is geo-restricted","Fall back to yt-dlp download mode for this clip"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}