jackwener/OpenCLI · warning · EmptyResultError
pinterest user-boards
Error message
pinterest user-boards
What it means
EmptyResultError from pinterest user-boards: the given username's profile page produced zero board rows. The library treats 'user exists but has no (visible) boards' — or an unparseable profile — as an explicit empty result.
Source
Thrown at clis/pinterest/user-boards.js:55
sourceUrl,
limit,
keyField: 'boardId',
pageSize: DEFAULT_PAGE_SIZE,
mapItem: (board) => {
if (!board || !board.id) return null;
return {
boardId: String(board.id),
name: board.name || '',
pinCount: typeof board.pin_count === 'number' ? board.pin_count : 0,
sectionCount: typeof board.section_count === 'number' ? board.section_count : 0,
privacy: board.privacy || 'public',
url: board.url ? `${PINTEREST_BASE}${board.url}` : '',
};
},
});
if (rows.length === 0) {
throw new EmptyResultError('pinterest user-boards', `no boards found for user "${username}"`);
}
return rows;
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the username resolves to a real profile with public boards in a browser
- Retry the scrape once after a short delay (transient empty renders happen under rate limiting)
- Catch EmptyResultError and treat it as 'no boards' — optionally fall back to `pinterest user` to at least confirm the account exists
Example fix
// before
const boards = await pinterest.userBoards({ username: 'janedoe' }); // throws if empty
// after
try {
return await pinterest.userBoards({ username: 'janedoe' });
} catch (e) {
if (e.name === 'EmptyResultError') return [];
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!/^[A-Za-z0-9_]{3,}$/.test(username)) throw new Error('pre-check: username looks invalid'); Try / catch
try { boards = await pinterest.userBoards({ username }); }
catch (e) {
if (e.name === 'EmptyResultError') return [];
throw e;
} Prevention
- Verify the profile has public boards before scraping
- Treat empty boards as a normal account state (private/brand accounts)
- Distinguish empty-board users from nonexistent users via the `pinterest user` command
When it happens
Trigger: collectResults on /<username>/ returns no board rows: the account has no public boards, the profile is private/suspended/deleted, the username is wrong and redirects to an empty state, or the scrape selectors find nothing.
Common situations: Targeting brand accounts that keep boards secret, users who deleted their boards, banned or renamed accounts, and typos in the username.
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
- pinterest user-pins
- pinterest user
- No series found for '${brand}'. Check the brand name spellin
- This series has no koubei rating yet.
- ${command} returned no results
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/4399ec5e20553859.
Report an issue: GitHub.