{"record":{"id":"adda7160e2398d63","repo":"tonhowtf/omniget","slug":"vimeo","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/vimeo.rs","lineNumber":762,"sourceCode":"async fn run_json(bin: &Path, args: &[String], secrets: &[&str]) -> Result<String> {\n    let _slot = crate::core::ytdlp::acquire_ytdlp_slot(\"vimeo-list\").await;\n    let mut cmd = crate::core::ytdlp::ytdlp_command(bin);\n    cmd.args(args).stdin(std::process::Stdio::null());\n    let out = cmd\n        .output()\n        .await\n        .map_err(|e| anyhow!(\"não foi possível iniciar o yt-dlp: {e}\"))?;\n    if !out.status.success() {\n        let tail = scrub(&String::from_utf8_lossy(&out.stderr), secrets);\n        let msg = tail\n            .lines()\n            .rev()\n            .find(|l| !l.trim().is_empty())\n            .unwrap_or(\"\")\n            .to_string();\n        return Err(match error_code(&msg) {\n            Some(code) => anyhow!(\"vimeo:{code}\"),\n            None => anyhow!(\"{}\", msg),\n        });\n    }\n    Ok(String::from_utf8_lossy(&out.stdout).to_string())\n}\n\n/// O que sobrou de um download. `tail` já passou pelo `scrub`.\nstruct DownloadOutcome {\n    file: Option<String>,\n    meta: Option<(String, String)>,\n    tail: String,\n    success: bool,\n}\n\n/// Roda um download e conta o que aconteceu.\nasync fn run_download(\n    bin: &Path,\n    args: &[String],\n    secrets: &[&str],","sourceCodeStart":744,"sourceCodeEnd":780,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/vimeo.rs#L744-L780","documentation":"The unclassified sibling of vimeo:{code}: when yt-dlp exits non-zero and error_code() finds no known pattern, run_json returns the raw scrubbed stderr tail as the anyhow message (vimeo.rs:762). Callers and downstream consumers (e.g., the omniget plugin layer that surfaces these messages) receive yt-dlp's own last stderr line verbatim, with no stable prefix to match.","triggerScenarios":"run_json failing with an unrecognized yt-dlp failure: new/unknown Vimeo errors after a site change, network DNS/TLS failures, unsupported URL, yt-dlp crashing with a traceback, or any error message not yet in the error_code table.","commonSituations":"yt-dlp version outdated after a Vimeo extractor change; no internet/DNS failure on the host; malformed Vimeo URL passed to enumeration; unexpected yt-dlp bug surfaced as a Python traceback.","solutions":["Read the message text — it is the last non-empty stderr line from yt-dlp and names the actual problem.","Update yt-dlp; most 'unrecognized' failures are extractor breakage fixed upstream.","Test the URL directly with `yt-dlp -J <url>` to reproduce outside the app.","If the failure is recurring and classifiable, add a new pattern to error_code() so it maps to vimeo:{code}."],"exampleFix":"// before: raw passthrough\nNone => anyhow!(\"{}\", msg),\n// after: keep passthrough but tag origin for consumers\nNone => anyhow!(\"vimeo:unclassified: {msg}\"),","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match one(url).await {\n    Err(e) if !e.to_string().starts_with(\"vimeo:\") => {\n        // unclassified yt-dlp stderr — log verbatim, suggest yt-dlp upgrade\n        eprintln!(\"erro não classificado do yt-dlp: {e}; tente atualizar o yt-dlp\");\n    }\n    other => other?,\n}","preventionTips":["Keep yt-dlp current — most unclassified failures are new extractor breakage","Reproduce with a direct `yt-dlp -J <url>` run before debugging the app","Verify host DNS/TLS works when messages mention resolution or certificate errors","Contribute recurring stderr patterns to error_code() so they become vimeo:{code}"],"tags":["yt-dlp","vimeo","stderr","unclassified-error"],"backgroundTag":"api-error-response","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"}