{"record":{"id":"d38845840ce85261","repo":"tonhowtf/omniget","slug":"o-instagram-nao-confirmou-o-video","errorCode":null,"errorMessage":"o Instagram nao confirmou o video","messagePattern":"o Instagram nao confirmou o video","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/instagram/publish.rs","lineNumber":456,"sourceCode":"                    .await\n                {\n                    Ok(json) if s(&json, \"status\") == \"ok\" => {\n                        report(\"done\", 3, 3);\n                        return Ok(result_of(&json));\n                    }\n                    Ok(json) => last = Some(anyhow!(\"configure: {}\", json)),\n                    Err(IgError::Other(e))\n                        if e.contains(\"Transcode\")\n                            || e.contains(\"not ready\")\n                            || e.contains(\"202\") =>\n                    {\n                        last = Some(anyhow!(e));\n                    }\n                    Err(e) => return Err(m(e)),\n                }\n                tokio::time::sleep(std::time::Duration::from_secs(4 + attempt * 3)).await;\n            }\n            Err(last.unwrap_or_else(|| anyhow!(\"o Instagram nao confirmou o video\")))\n        }\n        \"carousel\" => {\n            if req.files.len() < 2 || req.files.len() > 20 {\n                return Err(anyhow!(\"um carrossel tem de 2 a 20 arquivos\"));\n            }\n            let total = req.files.len() as u64 + 1;\n            let sidecar_id = upload_id();\n            let mut children: Vec<Value> = Vec::new();\n            for (i, f) in req.files.iter().enumerate() {\n                report(\"upload\", i as u64, total);\n                let path = Path::new(f);\n                let uid = format!(\"{}{}\", upload_id(), i);\n                let is_video = matches!(\n                    path.extension()\n                        .and_then(|e| e.to_str())\n                        .map(|e| e.to_lowercase())\n                        .as_deref(),\n                    Some(\"mp4\" | \"mov\" | \"m4v\" | \"webm\")","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/instagram/publish.rs#L438-L474","documentation":"If publish_web's video configure loop exits without any recorded last error, it fails with 'o Instagram nao confirmou o video' (Instagram did not confirm the video) as a catch-all. This is a defensive default indicating the configure confirmation never arrived.","triggerScenarios":"The retry loop for the video configure endpoint completed all attempts without a success and without populating last (edge case in error bookkeeping).","commonSituations":"Instagram API returning shapes the loop does not recognize, or a logic path where each attempt ends without setting last.","solutions":["Log the configure response bodies to see why confirmation never matched","Extend the retry window and re-check status explicitly","Confirm the media ID exists on Instagram before declaring failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// confirm media id exists before declaring failure\nlet exists = check_media_status(client, &media_id).await?;","typeGuard":null,"tryCatchPattern":"if e.to_string().contains(\"nao confirmou o video\") { // poll media status manually before retrying publish\n  poll_configure_status(media_id).await\n}","preventionTips":["Always record last error on every failed attempt","Explicitly query media status instead of relying only on configure response","Keep request/response logging for configure calls"],"tags":["instagram","video","confirmation","retry"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}