{"record":{"id":"7ba0436b32c3cadd","repo":"jackwener/OpenCLI","slug":"dblp-returned-an-empty-record-for-key-key","errorCode":null,"errorMessage":"dblp returned an empty record for key \"${key}\".","messagePattern":"dblp returned an empty record for key \"(.+?)\"\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/dblp/paper.js","lineNumber":36,"sourceCode":"cli({\n    site: 'dblp',\n    name: 'paper',\n    aliases: ['detail', 'view'],\n    access: 'read',\n    description: 'Fetch a dblp record by canonical key (e.g. conf/nips/VaswaniSPUJGKP17)',\n    domain: 'dblp.org',\n    strategy: Strategy.PUBLIC,\n    browser: false,\n    args: [\n        { name: 'key', positional: true, required: true, help: 'dblp record key (round-tripped from the `key` column of `dblp search`)' },\n    ],\n    columns: PAPER_COLUMNS,\n    func: async (args) => {\n        const key = requireRecordKey(args.key);\n        const xml = await dblpFetchXml(`/rec/${encodeURI(key)}.xml`, 'dblp paper');\n        const row = recordXmlToRow(xml);\n        if (!row.key && !row.title) {\n            throw new EmptyResultError('dblp paper', `dblp returned an empty record for key \"${key}\".`);\n        }\n        return [row];\n    },\n});\n","sourceCodeStart":18,"sourceCodeEnd":41,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/dblp/paper.js#L18-L41","documentation":"EmptyResultError thrown when the XML fetched from dblp's /rec/<key>.xml endpoint parses to a row with neither a 'key' nor a 'title' — i.e. dblp returned a structurally empty record for the requested record key.","triggerScenarios":"Calling `dblp paper <key>` with a record key whose fetched XML contains no usable fields — invalid/nonexistent record key, deleted dblp record, or a malformed response body.","commonSituations":"Typo in the dblp record key (e.g. missing venue prefix or wrong year); record removed from dblp; key copied from a wrong source; case/slash mistakes like 'conf/nipsFoo'.","solutions":["Verify the record key on dblp.org (the key appears in the bibtex/URL of the entry)","Use `dblp search '<title>'` to find the correct record key","Check for typos in venue name, year, and first-author parts of the key","Retry — occasionally dblp serves incomplete responses under load"],"exampleFix":"// before\nopencli dblp paper conf/wrongconf/2023/xyz\n// Error: dblp returned an empty record for key \"conf/wrongconf/2023/xyz\".\n// after\nopencli dblp search 'the paper title'   # then use the returned key","handlingStrategy":"validation","validationCode":"const REC_KEY_PATTERN = /^[a-z]+\\/[^\\s/]+\\/[^\\s/]+$/i; // e.g. conf/nips/2017/foo\nif (!REC_KEY_PATTERN.test(key)) throw new Error(`Suspicious dblp record key: ${key}`);","typeGuard":"function looksLikeRecordKey(k) {\n  return typeof k === 'string' && /^[a-z]+\\/[\\w.-]+\\/[\\w.-]+$/.test(k);\n}","tryCatchPattern":"try {\n  rows = await dblpPaper({ key });\n} catch (err) {\n  if (/empty record for key/.test(err.message)) {\n    rows = await dblpSearch({ query: key.split('/').pop() }); // search by key tail\n  } else throw err;\n}","preventionTips":["Source record keys from `dblp search` output rather than hand-typing","Validate key shape (venue/year/slug) before fetching","Check the key resolves on dblp.org when debugging","Handle removed records: keys can disappear from dblp over time"],"tags":["dblp","empty-result","record-key"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}