jackwener/OpenCLI · warning · EmptyResultError
${command} was not found
Error message
${command} was not found What it means
When requireRow sees payload.empty === true, it treats the result as a typed EmptyResultError. The message is either the payload's own reason or the fallback '${command} was not found'. This distinguishes 'the item genuinely does not exist / page reported empty' from selector drift or malformed payloads.
Source
Thrown at clis/dribbble/utils.js:92
if (!payload.ok) {
const reason = payload.reason ? `: ${payload.reason}` : '';
throw new CommandExecutionError(`${command} selector drift${reason}`);
}
if (!Array.isArray(payload.rows)) {
throw new CommandExecutionError(`${command} returned a malformed rows payload`);
}
if (payload.rows.length === 0) {
throw new EmptyResultError(command, `${command} page loaded but no matching rows were found`);
}
return payload.rows;
}
export function requireRow(payload, command) {
if (!payload || typeof payload !== 'object') {
throw new CommandExecutionError(`${command} returned an unreadable browser payload`);
}
if (payload.empty) {
throw new EmptyResultError(command, payload.reason || `${command} was not found`);
}
if (!payload.ok || !payload.row) {
const reason = payload.reason ? `: ${payload.reason}` : '';
throw new CommandExecutionError(`${command} selector drift${reason}`);
}
return payload.row;
}
export async function runBrowserTask(label, task) {
try {
return await task();
} catch (error) {
if (TYPED_ERROR_CODES.has(error?.code)) throw error;
throw new CommandExecutionError(`${label} failed: ${error?.message ?? error}`);
}
}
export function extractShotRows(limit) {View on GitHub (pinned to 49907e53dc)
Solutions
- Double-check the identifier (username/shot id/slug) passed to the command
- Open the URL manually in a browser to confirm the item exists and is public
- Catch EmptyResultError and present a 'not found' message instead of retrying
- If the item should exist, check for login/anti-bot walls that make the page render empty
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-validate identifiers
if (!/^[a-z0-9-]+$/i.test(username)) throw new Error('invalid dribbble username'); Type guard
function isEmptyResult(p) {
return p != null && typeof p === 'object' && p.empty === true;
} Try / catch
try {
const row = requireRow(payload, 'dribbble shot');
} catch (err) {
if (err?.code === 'EMPTY_RESULT') return null; // not found
throw err;
} Prevention
- Treat EMPTY_RESULT as expected for user-supplied identifiers
- Confirm slugs/usernames before calling
- Cache known-good identifiers to avoid repeated not-found lookups
When it happens
Trigger: The browser task for a detail-style command (shot, designer, profile) returned { empty: true } with no reason — e.g. the requested Dribbble item does not exist, was deleted, or the page rendered an empty/not-found state.
Common situations: Fetching a deleted or renamed shot/designer; mistyping a Dribbble username in the command; item is private or region-blocked so the page renders empty.
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
- NOT_FOUND
- 1point3acres thread
- 1point3acres user
- amazon ${definition.commandName} did not expose any ranked i
- amazon search did not expose any product cards
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/78967c6b278119fa.
Report an issue: GitHub.