{"record":{"id":"a86daf94719d4d12","repo":"tonhowtf/omniget","slug":"arxiv-nao-reconheceu-o-identificador","errorCode":null,"errorMessage":"arXiv nao reconheceu o identificador: {}","messagePattern":"arXiv nao reconheceu o identificador: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/arxiv.rs","lineNumber":218,"sourceCode":"    pub categories: Vec<String>,\n    pub primary_category: String,\n    pub published: String,\n    pub updated: String,\n    pub doi: Option<String>,\n    pub journal_ref: Option<String>,\n    pub comment: Option<String>,\n    pub abs_url: String,\n    pub pdf_url: String,\n}\n\n/// Lê o Atom da API do arXiv. Sem crate de XML: o formato é fixo.\npub fn parse_atom(xml: &str) -> anyhow::Result<Meta> {\n    let entry = tag(xml, \"entry\").ok_or_else(|| anyhow!(\"resposta do arXiv sem <entry>\"))?;\n    let raw_id = tag(&entry, \"id\").unwrap_or_default();\n    let title = squeeze(&unescape(&tag(&entry, \"title\").unwrap_or_default()));\n    if title.eq_ignore_ascii_case(\"error\") || raw_id.contains(\"api/errors\") {\n        let msg = squeeze(&unescape(&tag(&entry, \"summary\").unwrap_or_default()));\n        return Err(anyhow!(\n            \"arXiv nao reconheceu o identificador: {}\",\n            if msg.is_empty() { \"sem detalhe\" } else { &msg }\n        ));\n    }\n    let short = raw_id\n        .rsplit(\"/abs/\")\n        .next()\n        .unwrap_or(&raw_id)\n        .trim()\n        .to_string();\n    let r = parse_id(&short).unwrap_or(ArxivRef {\n        id: short.clone(),\n        version: None,\n    });\n\n    let authors = tags(&entry, \"author\")\n        .iter()\n        .filter_map(|a| tag(a, \"name\"))","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/arxiv.rs#L200-L236","documentation":"When arXiv cannot resolve the requested identifier it still returns an Atom feed whose entry has title \"Error\" or an id containing \"api/errors\". parse_atom detects that and fails with this message, embedding the entry's <summary> text (or \"sem detalhe\" if empty). It means the id/URL submitted to arXiv was not recognized.","triggerScenarios":"Fetching a nonexistent or malformed arXiv id (e.g. missing version, wrong category prefix, old id with wrong format); id passed through parse_id but rejected server-side by the API.","commonSituations":"User pastes a full arXiv URL fragment incorrectly; typo in the id (e.g. 2101.0000 vs 2101.00001); requesting an id with an invalid version suffix; old pre-2007 ids mistyped.","solutions":["Read the `msg` in the error — arXiv's summary states exactly what was wrong with the identifier.","Validate/normalize the id with the crate's parse_id before calling the API.","Confirm the paper exists at https://arxiv.org/abs/<id>.","If using a versioned id, try dropping the version suffix (e.g. 1706.03762v5 -> 1706.03762)."],"exampleFix":"// before\nlet r = parse_id(&opts.input).ok_or_else(...)?;\nlet xml = client.get(&url).text().await?;\n// after\nlet r = parse_id(&opts.input).ok_or_else(...)?;\nlet xml = client.get(&url).text().await?;\nif let Err(e) = parse_atom(&xml) {\n    if e.to_string().contains(\"nao reconheceu o identificador\") {\n        eprintln!(\"id {} invalido segundo o arXiv; confira arxiv.org/abs/{}\", r.full(), r.full());\n    }\n    return Err(e);\n}","handlingStrategy":"validation","validationCode":"// pre-flight: id bem formado\nlet id = parse_id(&input).ok_or(\"formato de id arXiv nao reconhecido\")?;\n// opcional: conferir existencia antes\n// GET https://arxiv.org/abs/{id.full()} e checar status 200","typeGuard":null,"tryCatchPattern":"match fetch(opts).await {\n    Err(e) if e.to_string().contains(\"nao reconheceu o identificador\") => {\n        eprintln!(\"id invalido segundo o arXiv: use arxiv.org/abs/<id> para conferir\");\n    }\n    other => other,\n}","preventionTips":["Normalize input: strip 'arXiv:' prefixes, whitespace, and punctuation before parsing.","Verify the paper exists on arxiv.org/abs before batch processing.","Check arXiv's summary message in the error for the exact server-side complaint."],"tags":["arxiv","invalid-identifier","api","validation"],"backgroundTag":"invalid-identifier-format","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"}