{"record":{"id":"f077773711913d8c","repo":"tonhowtf/omniget","slug":"informe-o-blog-dos-likes","errorCode":null,"errorMessage":"informe o blog dos likes","messagePattern":"informe o blog dos likes","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/tumblr/likes.rs","lineNumber":316,"sourceCode":"            r.post_id.clone(),\n            r.blog.clone(),\n            r.date.clone(),\n            r.kind.clone(),\n            r.tags.join(\" \"),\n            r.post_url.clone(),\n            r.summary.replace(['\\n', '\\r'], \" \"),\n            r.note_count.to_string(),\n            r.media_urls.join(\" | \"),\n            r.local_files.join(\" | \"),\n        ]));\n    }\n    out\n}\n\npub async fn run(opts: &Options, progress: &super::super::ProgressFn) -> Result<LikesResult> {\n    let url = likes_url(&opts.blog);\n    if url.is_empty() {\n        anyhow::bail!(\"informe o blog dos likes\");\n    }\n    let cookies = match opts.session_netscape.as_deref() {\n        Some(s) => gdl::write_cookies(s, &[\"tumblr.com\"])?,\n        None => None,\n    };\n    let used_session = cookies.is_some();\n\n    super::super::report(progress, TOOL_ID, \"started\", 0, None, Some(url.clone()));\n    let extra = vec![\n        \"-o\".to_string(),\n        \"extractor.tumblr.posts=all\".to_string(),\n        \"-o\".to_string(),\n        \"extractor.tumblr.original=true\".to_string(),\n    ];\n    let entries = gdl::dump(\n        &url,\n        cookies.as_ref().map(|c| c.path.as_path()),\n        opts.limit,","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/tumblr/likes.rs#L298-L334","documentation":"Required-argument guard in tumblr likes run: the blog identifier, after building the likes URL, produced an empty string — no API endpoint can be constructed, so the export is refused before any network call.","triggerScenarios":"Calling likes `run` with Options whose `blog` field is empty or blank, making likes_url() return an empty string.","commonSituations":"Blog name omitted from config/CLI; flag typo so the value never reaches Options; programmatically constructed Options left at defaults.","solutions":["Set the `blog` field to the Tumblr blog whose likes should be exported","Validate (trim + non-empty check) before invoking run","Fix the CLI/config-to-Options wiring if the value is being dropped"],"exampleFix":"// before\nlet opts = Options { blog: \"\".into(), .. };\n// after\nlet opts = Options { blog: \"someblog\".into(), .. };","handlingStrategy":"validation","validationCode":"if opts.blog.trim().is_empty() {\n    return Err(anyhow!(\"blog dos likes é obrigatório\"));\n}","typeGuard":"fn blog_is_set(opts: &likes::Options) -> bool {\n    !opts.blog.trim().is_empty()\n}","tryCatchPattern":"match likes::run(&opts, progress).await {\n    Err(e) if e.to_string() == \"informe o blog dos likes\" => eprintln!(\"configure o campo blog\"),\n    Err(e) => return Err(e),\n    Ok(r) => use(r),\n}","preventionTips":["Validate the blog field before invoking run","Ensure CLI flags map to Options.blog correctly","Use typed config parsing to catch missing fields early"],"tags":["tumblr","likes","validation","missing-argument"],"backgroundTag":"missing-required-argument","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"}