jackwener/OpenCLI · warning · EmptyResultError
dblp returned an empty record for key "${key}".
Error message
dblp returned an empty record for key "${key}". What it means
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.
Source
Thrown at clis/dblp/paper.js:36
cli({
site: 'dblp',
name: 'paper',
aliases: ['detail', 'view'],
access: 'read',
description: 'Fetch a dblp record by canonical key (e.g. conf/nips/VaswaniSPUJGKP17)',
domain: 'dblp.org',
strategy: Strategy.PUBLIC,
browser: false,
args: [
{ name: 'key', positional: true, required: true, help: 'dblp record key (round-tripped from the `key` column of `dblp search`)' },
],
columns: PAPER_COLUMNS,
func: async (args) => {
const key = requireRecordKey(args.key);
const xml = await dblpFetchXml(`/rec/${encodeURI(key)}.xml`, 'dblp paper');
const row = recordXmlToRow(xml);
if (!row.key && !row.title) {
throw new EmptyResultError('dblp paper', `dblp returned an empty record for key "${key}".`);
}
return [row];
},
});
View on GitHub (pinned to 49907e53dc)
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
Example fix
// before opencli dblp paper conf/wrongconf/2023/xyz // Error: dblp returned an empty record for key "conf/wrongconf/2023/xyz". // after opencli dblp search 'the paper title' # then use the returned key
Defensive patterns
Strategy: validation
Validate before calling
const REC_KEY_PATTERN = /^[a-z]+\/[^\s/]+\/[^\s/]+$/i; // e.g. conf/nips/2017/foo
if (!REC_KEY_PATTERN.test(key)) throw new Error(`Suspicious dblp record key: ${key}`); Type guard
function looksLikeRecordKey(k) {
return typeof k === 'string' && /^[a-z]+\/[\w.-]+\/[\w.-]+$/.test(k);
} Try / catch
try {
rows = await dblpPaper({ key });
} catch (err) {
if (/empty record for key/.test(err.message)) {
rows = await dblpSearch({ query: key.split('/').pop() }); // search by key tail
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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'.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No dblp author matched "${name}". Try a different spelling,
- dblp PID ${pid}${resolvedName ? ` (${resolvedName})` : ''} h
- No publications matched "${query}".
- dblp returned 404 — the requested record may not exist.
- No dblp venues matched "${query}".
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/7ba0436b32c3cadd.
Report an issue: GitHub.