{"record":{"id":"ab5e928fbc819689","repo":"jackwener/OpenCLI","slug":"no-pins-found-in-board-username-slug","errorCode":null,"errorMessage":"no pins found in board \"${username}/${slug}\"","messagePattern":"no pins found in board \"(.+?)/(.+?)\"","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/pinterest/board-pins.js","lineNumber":53,"sourceCode":"\n    const rows = await collectPins(page, {\n      resource: 'BoardFeedResource',\n      baseOptions: {\n        board_id: String(boardId),\n        board_url: path,\n        currentFilter: -1,\n        field_set_key: 'react_grid_pin',\n        filter_section_pins: true,\n        sort: 'default',\n        layout: 'default',\n      },\n      sourceUrl: path,\n      limit,\n      pageSize: DEFAULT_PAGE_SIZE,\n    });\n\n    if (rows.length === 0) {\n      throw new EmptyResultError('pinterest board-pins', `no pins found in board \"${username}/${slug}\"`);\n    }\n    return rows;\n  },\n});\n","sourceCodeStart":35,"sourceCodeEnd":58,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/pinterest/board-pins.js#L35-L58","documentation":"This EmptyResultError is thrown by the `pinterest board-pins` command when the board exists but the pin-listing API returned zero rows. The library treats an empty result as a distinct, expected outcome rather than silently returning an empty table, so callers can distinguish 'board is empty' from 'board not found'. It fires only after a successful fetch, so pagination or permission issues that return rows never reach it.","triggerScenarios":"Calling `pinterest board-pins <username>/<slug>` against a board that genuinely contains no pins; a board whose pins are all hidden (secret/archived); passing a slug that resolves to a different user's empty board; or a fetch where rows.length === 0 at DEFAULT_PAGE_SIZE because the board was just created.","commonSituations":"Automating a newly created board before adding pins; typo'd board slug matching an empty test board; running the command in CI against a fresh account; assuming a board has content after a section delete moved pins back to the board.","solutions":["Verify the board actually has pins by opening `${PINTEREST_BASE}${username}/${slug}` in a browser or via `pinterest board-sections`/board listing","Add pins to the board or point the command at a board that contains pins","Catch EmptyResultError in your script and treat it as an empty board (skip processing) instead of failing the pipeline","Re-check the username/slug arguments — a wrong slug can silently resolve to a different, empty board"],"exampleFix":"// before\nconst pins = await cli.run('pinterest board-pins myuser/ideas');\n// after\nlet pins;\ntry {\n  pins = await cli.run('pinterest board-pins myuser/ideas');\n} catch (err) {\n  if (err.name === 'EmptyResultError') pins = [];\n  else throw err;\n}","handlingStrategy":"try-catch","validationCode":"if (!username || !slug) throw new Error('board username/slug required');\n// pin count cannot be known without the API; pre-check the board resolves:\nconst board = await cli.run(`pinterest board-show ${username}/${slug}`);","typeGuard":"function isEmptyResult(err) {\n  return err instanceof Error && err.name === 'EmptyResultError';\n}","tryCatchPattern":"try {\n  const pins = await boardPins(username, slug);\n} catch (err) {\n  if (isEmptyResult(err)) {\n    pins = []; // empty board is a valid state\n  } else throw err;\n}","preventionTips":["Verify the board has pins in the Pinterest UI before scripting against it","Treat EmptyResultError as a signal to skip, not crash, in batch jobs","Double-check username/slug spelling — wrong slugs can hit empty boards","Run board listing first to confirm the board is non-empty"],"tags":["pinterest","empty-result","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}