jackwener/OpenCLI · error · CommandExecutionError
Could not resolve board "${username}/${slug}" (does it exist
Error message
Could not resolve board "${username}/${slug}" (does it exist and is it public?) What it means
The pinterest board-sections command could not turn the "username/slug" board reference into a board id. The BoardResource lookup either returned nothing or a board object without an id, which happens when the board does not exist or is private/secret and thus not visible to the fetching session. The command aborts before querying BoardSectionsResource.
Source
Thrown at clis/pinterest/board-sections.js:32
domain: 'www.pinterest.com',
strategy: Strategy.COOKIE,
args: [
{ name: 'board', type: 'string', positional: true, required: true, help: '<username>/<slug>, a board URL, or a numeric board id, e.g. janedoe/my-board' },
{ name: 'limit', type: 'int', default: DEFAULT_LIMIT, help: `Number of sections (max ${MAX_LIMIT})` },
],
columns: ['sectionId', 'title', 'slug', 'pinCount', 'url'],
func: async (page, kwargs) => {
const limit = requireLimit(kwargs.limit, { fallback: DEFAULT_LIMIT, max: MAX_LIMIT });
const { username, slug, path, board: preloadedBoard } = await resolveBoardTarget(page, kwargs.board);
await page.goto(`${PINTEREST_BASE}${path}`);
// A board id argument already fetched the board, so only look it up when addressed by slug.
const board = preloadedBoard
|| (await pinterestResourceFetch(page, 'BoardResource', { username, slug, field_set_key: 'detailed' }, path)).data;
const boardId = board && board.id;
if (!boardId) {
throw new CommandExecutionError(`Could not resolve board "${username}/${slug}" (does it exist and is it public?)`);
}
const { results } = await pinterestResourceFetch(
page,
'BoardSectionsResource',
{ board_id: String(boardId) },
path,
);
const rows = results
.filter((section) => section && section.id)
.slice(0, limit)
.map((section) => ({
sectionId: String(section.id),
title: (section.title || '').trim(),
slug: section.slug || '',
pinCount: typeof section.pin_count === 'number' ? section.pin_count : 0,
url: section.slug ? `${PINTEREST_BASE}${path}${section.slug}/` : '',View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the board exists and is public by opening https://pinterest.com/<username>/<slug>/ in a browser.
- Correct the username/slug argument, using the slug from the board's URL exactly.
- If the board is secret, make it public or use a board id argument instead of the slug.
- Re-run the command with the numeric board id, which skips the slug resolution path entirely.
Example fix
// before
await cli.boardSections('someone/wrong-slug');
// after
await cli.boardSections('someone', { board: '1234567890' }); // or corrected slug Defensive patterns
Strategy: validation
Validate before calling
if (!/^[^/]+\/.+$/.test(boardArg)) throw new Error('pass board as username/slug');
// verify existence out-of-band:
const res = await fetch(`https://pinterest.com/${boardArg}/`);
if (!res.ok) throw new Error(`board ${boardArg} not public/missing`); Type guard
function isResolvableBoard(b) {
return typeof b === 'string' && b.includes('/') && b.trim().length > 0;
} Try / catch
try {
const sections = await cli.boardSections('user/slug');
} catch (e) {
if (/Could not resolve board/.test(e.message)) {
console.error('Board missing or private:', e.message); // fallback to id-based lookup
} else throw e;
} Prevention
- Copy slugs directly from the board's public URL
- Prefer numeric board ids for automations (skips slug resolution)
- Confirm boards are public before scripting against them
- Re-check references after boards are renamed or deleted
When it happens
Trigger: Running `pinterest board-sections <username>/<slug>` where the slug is misspelled, the board was renamed or deleted, or the board is secret (private) so the BoardResource fetch with field_set_key 'detailed' returns no board id.
Common situations: Typo in the board slug after a rename; querying another user's secret board; URL-decoded slug mismatch (special characters); stale cached references to a deleted board.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- board "${username}/${slug}" has no sections
- Unknown privacy "${privacy}". Valid: ${PRIVACY.join(', ')}
- nothing to update
- pin "${id}" not found
- Pin ${id} has no downloadable image (it may be a video or st
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/536308351c5826fd.
Report an issue: GitHub.