{"record":{"id":"2e65ccf100be5639","repo":"tonhowtf/omniget","slug":"informe-pelo-menos-um-perfil-de-favoritos","errorCode":null,"errorMessage":"informe pelo menos um perfil de favoritos","messagePattern":"informe pelo menos um perfil de favoritos","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/tumblr/art.rs","lineNumber":393,"sourceCode":"    let sources: Vec<(&str, String)> = PLATFORMS\n        .iter()\n        .filter_map(|p| {\n            let raw = match *p {\n                \"deviantart\" => opts.deviantart.as_deref(),\n                \"artstation\" => opts.artstation.as_deref(),\n                \"flickr\" => opts.flickr.as_deref(),\n                _ => None,\n            }?;\n            let url = source_url(p, raw);\n            if url.is_empty() {\n                None\n            } else {\n                Some((*p, url))\n            }\n        })\n        .collect();\n    if sources.is_empty() {\n        anyhow::bail!(\"informe pelo menos um perfil de favoritos\");\n    }\n\n    let cookies = match opts.session_netscape.as_deref() {\n        Some(s) => gdl::write_cookies(s, &domains())?,\n        None => None,\n    };\n    let used_session = cookies.is_some();\n    let cookie_path = cookies.as_ref().map(|c| c.path.clone());\n\n    let mut rows: Vec<FavRow> = Vec::new();\n    let mut by_platform: Vec<(String, u64)> = Vec::new();\n    for (platform, url) in &sources {\n        super::super::report(progress, TOOL_ID, \"started\", 0, None, Some(url.clone()));\n        let entries = gdl::dump(\n            url,\n            cookie_path.as_deref(),\n            opts.limit,\n            &[],","sourceCodeStart":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/tumblr/art.rs#L375-L411","documentation":"The Tumblr favorites tool builds a list of (profile, url) sources from the user's options before fetching likes. If no profile survives normalization/filtering, there is nothing to fetch and it bails with this message.","triggerScenarios":"Calling the favorites `run` without providing any favorite profile names, or providing profiles that are all filtered out (blank, invalid, or self-referential entries removed by the collect step).","commonSituations":"Forgot to fill the profiles option; passed only whitespace/empty strings; passed a list in the wrong field of Options; CLI flag typo so the profiles never reach the run function.","solutions":["Provide at least one valid Tumblr profile name in the favorites option","Strip whitespace and validate profile names before calling run","Check the CLI/config binding so the profiles land in the correct Options field","Confirm the profile list is not accidentally deduplicated/filtered to nothing"],"exampleFix":"// before\nlet opts = Options { profiles: vec![], .. };\n// after\nlet opts = Options { profiles: vec![\"someblog\".into()], .. };","handlingStrategy":"validation","validationCode":"let profiles: Vec<_> = opts.profiles.iter().map(|s| s.trim()).filter(|s| !s.is_empty()).collect();\nif profiles.is_empty() {\n    return Err(anyhow!(\"informe pelo menos um perfil\"));\n}","typeGuard":null,"tryCatchPattern":"match art::run(opts).await {\n    Err(e) if e.to_string().contains(\"informe pelo menos um perfil\") => eprintln!(\"configure ao menos um perfil de favoritos\"),\n    Err(e) => return Err(e),\n    Ok(r) => use(r),\n}","preventionTips":["Validate the profiles list is non-empty after trimming","Bind CLI/config flags correctly to the Options struct","Reject whitespace-only profile names early"],"tags":["tumblr","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"}