{"record":{"id":"5ea671cea24ccf46","repo":"tonhowtf/omniget","slug":"nao-sei-exportar","errorCode":null,"errorMessage":"nao sei exportar {}","messagePattern":"nao sei exportar (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/x/archive.rs","lineNumber":533,"sourceCode":"                _ => {\n                    l.likes\n                        .iter()\n                        .map(|k| format!(\"- {}\\n  {}\", k.text.replace('\\n', \" \"), k.url))\n                        .collect::<Vec<_>>()\n                        .join(\"\\n\")\n                        + \"\\n\"\n                }\n            };\n            std::fs::write(&file, content)?;\n            Ok(file.to_string_lossy().to_string())\n        }\n        \"followers\" => accounts(&l.followers),\n        \"following\" => accounts(&l.following),\n        \"not_following_back\" => accounts(&l.summary.not_following_back),\n        \"fans\" => accounts(&l.summary.fans),\n        \"blocked\" => accounts(&l.blocked),\n        \"muted\" => accounts(&l.muted),\n        other => Err(anyhow!(\"nao sei exportar {}\", other)),\n    }\n}\n","sourceCodeStart":515,"sourceCodeEnd":536,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/x/archive.rs#L515-L536","documentation":"X archive export matches a requested dataset key against a fixed set (followers, following, not_following_back, fans, blocked, muted). Any other key falls into the catch-all arm and errors with 'nao sei exportar <key>', i.e. the requested export type is not implemented for X archives.","triggerScenarios":"Calling export with a kind string not in the match list — typos ('follower', 'mutuals'), invented kinds, or kinds supported for other platforms but not X.","commonSituations":"Frontend sends a hardcoded kind that drifted from backend enum; user picks an unsupported list; localized key names passed through from UI.","solutions":["Use one of the supported kinds exactly: followers, following, not_following_back, fans, blocked, muted.","Check the frontend constant/enum against the backend match arms and fix the mismatch.","Trim/lowercase user-supplied kind strings before calling export.","Add a new match arm in export if the dataset genuinely needs support."],"exampleFix":"// before\nexport(kind = \"follower\")  // -> nao sei exportar follower\n// after\nexport(kind = \"followers\")","handlingStrategy":"validation","validationCode":"const VALID_KINDS = [\"followers\",\"following\",\"not_following_back\",\"fans\",\"blocked\",\"muted\"];\nif (!VALID_KINDS.includes(kind)) throw new Error(`unsupported export kind: ${kind}`);","typeGuard":"fn is_valid_export_kind(k: &str) -> bool {\n    matches!(k, \"followers\" | \"following\" | \"not_following_back\" | \"fans\" | \"blocked\" | \"muted\")\n}","tryCatchPattern":null,"preventionTips":["Share a single enum/constant list of kinds between frontend and backend.","Normalize (trim/lowercase) user-provided kind strings.","Drive the UI options from the backend's supported kinds.","Add a test covering every supported kind string."],"tags":["x-archive","invalid-argument","export"],"backgroundTag":"invalid-enum-value","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"}