jackwener/OpenCLI · warning · EmptyResultError

No papers found for "${term}". Try a different keyword.

Error message

No papers found for "${term}". Try a different keyword.

What it means

The openreview search command hits /notes/search?term=<term>&type=terms. If the API responds successfully but returns an empty notes array, EmptyResultError is thrown with the search term echoed, prompting the user to try different keywords. OpenReview's term search is strict about token prefixes, so overly specific queries often yield nothing.

Source

Thrown at clis/openreview/search.js:31

    domain: 'openreview.net',
    strategy: Strategy.PUBLIC,
    browser: false,
    args: [
        { name: 'query', positional: true, required: true, help: 'Search keyword (e.g. "diffusion model")' },
        { name: 'limit', type: 'int', default: 25, help: 'Max results (max 50)' },
    ],
    columns: ['rank', 'id', 'title', 'authors', 'venue', 'pdate', 'url'],
    func: async (args) => {
        const term = String(args.query ?? '').trim();
        if (!term) {
            throw new ArgumentError('openreview search query cannot be empty');
        }
        const limit = requireBoundedInt(args.limit, 25, 50);
        const path = `/notes/search?term=${encodeURIComponent(term)}&type=terms&limit=${limit}`;
        const json = await openreviewFetch(path, 'openreview search');
        const notes = Array.isArray(json?.notes) ? json.notes : [];
        if (!notes.length) {
            throw new EmptyResultError('openreview', `No papers found for "${term}". Try a different keyword.`);
        }
        return notes.slice(0, limit).map((note, i) => {
            const row = noteToRow(note);
            return {
                rank: i + 1,
                id: row.id,
                title: row.title,
                authors: row.authors,
                venue: row.venue,
                pdate: row.pdate,
                url: row.url,
            };
        });
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Shorten the query to a single keyword or meaningful prefix (e.g. "transformer" not the full title)
  2. Check spelling of the search term
  3. Search the exact title on openreview.net to confirm the paper is public/indexed
  4. Raise --limit up to the max of 50 in case ranking pushed it out
  5. Fall back to a different distinctive word from the title

Example fix

// before
openreview search "attention is all you need"
// after
openreview search "attention"
Defensive patterns

Strategy: fallback

Validate before calling

const term = String(rawQuery ?? '').trim();
if (!term) throw new Error('Query required');
if (term.split(/\s+/).length > 3) {
    console.warn('OpenReview term search matches prefixes; consider a shorter query.');
}

Try / catch

try {
    return await searchCommand({ query: term, limit: 25 });
} catch (err) {
    if (err instanceof EmptyResultError) {
        const fallbackTerm = term.split(/\s+/)[0];
        return await searchCommand({ query: fallbackTerm, limit: 25 });
    }
    throw err;
}

Prevention

When it happens

Trigger: openreviewFetch('/notes/search?term=...') succeeds with json.notes missing or empty for the given term and limit.

Common situations: Multi-word queries where OpenReview term search only matches prefixes (e.g. 'attention is all you need' finds nothing but 'attention' does); misspelled keywords; searching for very new papers not yet indexed; special characters mangling the encoded term.

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


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/95452038e7d182c3. Report an issue: GitHub.