jackwener/OpenCLI · warning · EmptyResultError
board "${username}/${slug}" has no sections
Error message
board "${username}/${slug}" has no sections What it means
The board was resolved successfully but the BoardSectionsResource fetch returned zero sections, so the command has nothing to output and raises EmptyResultError. Pinterest boards are not required to have sections, so an existing board can legitimately have none.
Source
Thrown at clis/pinterest/board-sections.js:54
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}/` : '',
}));
if (rows.length === 0) {
throw new EmptyResultError('pinterest board-sections', `board "${username}/${slug}" has no sections`);
}
return rows;
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Treat empty sections as a valid result and skip the board in your automation.
- Check the board in the Pinterest UI to confirm it actually has sections.
- Catch EmptyResultError and fall back to listing the board's pins instead.
- Use a different board that has sections if section data is required.
Example fix
// before
const sections = await cli.boardSections('user/board');
// after
let sections = [];
try { sections = await cli.boardSections('user/board'); } catch (e) { /* no sections is fine */ } Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
null
Try / catch
try {
const sections = await cli.boardSections('user/board');
} catch (e) {
if (/has no sections/.test(e.message)) {
const sections = []; // empty is valid
} else throw e;
} Prevention
- Treat zero sections as normal output, not a failure
- Skip flat boards when iterating many boards
- Check the board in the Pinterest UI if sections are expected
- Fall back to listing the board's pins when sections are empty
When it happens
Trigger: Calling `pinterest board-sections <username>/<slug>` on a board that exists and is public but whose pins are all unsectioned (no custom sections created).
Common situations: Automations that assume every board has sections; newly created boards; boards where the owner removed all sections; scripts iterating many boards where some are flat.
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
- pin "${id}" not found
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
- CoinGecko returned no category data.
- coingecko top
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/68e9b2e1907087f1.
Report an issue: GitHub.