{"record":{"id":"6135bc71cc05e95c","repo":"jackwener/OpenCLI","slug":"no-recent-papers-in-category-check-the-categor","errorCode":null,"errorMessage":"No recent papers in ${category}. Check the category name.","messagePattern":"No recent papers in (.+?)\\. Check the category name\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/arxiv/recent.js","lineNumber":23,"sourceCode":"    site: 'arxiv',\n    name: 'recent',\n    access: 'read',\n    description: 'List recent arXiv submissions in a category',\n    strategy: Strategy.PUBLIC,\n    browser: false,\n    args: [\n        { name: 'category', positional: true, required: true, help: 'arXiv category (e.g. cs.CL, cs.LG, math.PR, q-bio.NC)' },\n        { name: 'limit', type: 'int', default: 10, help: 'Max results (max 50)' },\n    ],\n    columns: ['id', 'title', 'authors', 'published', 'primary_category', 'url'],\n    func: async (args) => {\n        const category = normalizeArxivCategory(args.category);\n        const limit = normalizeArxivLimit(args.limit, 10, 50);\n        const query = encodeURIComponent(`cat:${category}`);\n        const xml = await arxivFetch(`search_query=${query}&max_results=${limit}&sortBy=submittedDate&sortOrder=descending`);\n        const entries = parseEntries(xml);\n        if (!entries.length)\n            throw new EmptyResultError('arxiv', `No recent papers in ${category}. Check the category name.`);\n        return entries.map(e => ({\n            id: e.id,\n            title: e.title,\n            authors: e.authors,\n            published: e.published,\n            primary_category: e.primary_category,\n            url: e.url,\n        }));\n    },\n});\n","sourceCodeStart":5,"sourceCodeEnd":34,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/arxiv/recent.js#L5-L34","documentation":"An EmptyResultError thrown when an arXiv category search returns no entries. The category is first normalized (normalizeArxivCategory) and queried as cat:<category> sorted by submission date; an empty result most often means the category string does not match a real arXiv category. It tells the user to check the category name.","triggerScenarios":"`opencli arxiv recent <category>` where the cat: query matches no papers — invalid category identifier (e.g. \"cs.ml\" vs correct \"cs.LG\"), wrong case, or an obscure category with no recent submissions in scope.","commonSituations":"Using dots instead of case-sensitive dashes (cs.ml vs cs.LG); inventing category names; arXiv category renames/archives (old categories like astro-ph become astro-ph.CO etc.); typo in the archive specifier.","solutions":["Check the exact arXiv category identifier, case-sensitive: cs.LG, math.CO, astro-ph.GA at arxiv.org/category_taxonomy","Fix common mistakes: use dashes not dots, correct casing (cs.CV not cs.cv)","Try a broad parent category (cs, math) to confirm the command works, then narrow","Run `opencli arxiv search <keyword>` to find which categories the papers use"],"exampleFix":"// before\nawait exec('opencli arxiv recent cs.ml'); // wrong format\n// after\nconst cat = String(input).trim();\nif (!/^[a-z-]+(\\.[A-Z]{2})?$/.test(cat)) throw new Error('invalid arXiv category: ' + cat);\nawait exec('opencli arxiv recent ' + cat.replace(/\\./g, (m, i) => i > 0 ? '.' : '.')); // e.g. cs.LG","handlingStrategy":"validation","validationCode":"const VALID = /^([a-z-]+)(\\.[A-Z]{2})?$/; // e.g. cs, cs.LG, math.CO\nconst cat = String(category || '').trim();\nif (!VALID.test(cat)) throw new Error(`invalid arXiv category: ${cat} (use e.g. cs.LG)`);","typeGuard":"function isCategoryFormat(s) { return typeof s === 'string' && /^([a-z-]+)(\\.[A-Z]{2})?$/.test(s.trim()); }","tryCatchPattern":"try {\n  return await exec('opencli arxiv recent ' + cat);\n} catch (e) {\n  if (e.name === 'EmptyResultError') {\n    console.error('Check category at arxiv.org/category_taxonomy; is \"' + cat + '\" correct and current?');\n    return [];\n  }\n  throw e;\n}","preventionTips":["Copy category identifiers exactly from the arXiv taxonomy (case-sensitive, dashes not dots)","Check for archived/renamed categories when a previously working one fails","Test with a broad parent category (cs, math) first","Keep a whitelist of valid categories in wrapper scripts"],"tags":["empty-result","arxiv","validation"],"backgroundTag":"invalid-identifier","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}