{"record":{"id":"a141aa6a9a03a8e5","repo":"jackwener/OpenCLI","slug":"pinterest-search-boards","errorCode":null,"errorMessage":"pinterest search-boards","messagePattern":"pinterest search-boards","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/pinterest/search-boards.js","lineNumber":50,"sourceCode":"      sourceUrl,\n      limit,\n      keyField: 'boardId',\n      pageSize: DEFAULT_PAGE_SIZE,\n      mapItem: (board) => {\n        if (!board || board.type !== 'board' || !board.id) return null;\n        return {\n          boardId: String(board.id),\n          name: board.name || '',\n          pinCount: typeof board.pin_count === 'number' ? board.pin_count : 0,\n          owner: (board.owner && board.owner.username) || '',\n          description: (board.description || '').trim(),\n          url: board.url ? `${PINTEREST_BASE}${board.url}` : '',\n        };\n      },\n    });\n\n    if (rows.length === 0) {\n      throw new EmptyResultError('pinterest search-boards', `no boards found for \"${query}\"`);\n    }\n    return rows;\n  },\n});\n","sourceCodeStart":32,"sourceCodeEnd":55,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/pinterest/search-boards.js#L32-L55","documentation":"EmptyResultError from pinterest search-boards: Pinterest returned no board rows for the given keyword after collecting results up to the requested limit. The library throws this instead of silently returning an empty array so callers can distinguish 'no matches' from a successful empty query.","triggerScenarios":"A valid non-empty query whose /search/boards/ scrape yields zero rows within the limit — e.g. a gibberish keyword, an extremely niche term, or Pinterest serving an empty/consent wall page the scraper could not extract boards from.","commonSituations":"Typo in the search term, searching for a keyword with no public boards, region/language settings returning an empty results grid, or Pinterest A/B layouts changing DOM selectors so extraction finds nothing.","solutions":["Retry with a broader or corrected keyword (drop filters, use common terms)","Increase --limit in case results load late, and verify the query renders results on pinterest.com in a browser","Handle the empty case in your script: catch EmptyResultError and treat it as 'no data' rather than a crash"],"exampleFix":"// before\nconst boards = await pinterest.searchBoards({ query: 'xzqvbnonsense' }); // throws\n// after\ntry {\n  const boards = await pinterest.searchBoards({ query: 'home decor' });\n} catch (e) {\n  if (e.name === 'EmptyResultError') return [];\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"if (typeof query !== 'string' || !query.trim()) throw new Error('pre-check: query must be a non-empty string');","typeGuard":null,"tryCatchPattern":"try { rows = await run('pinterest search-boards', [query]); }\ncatch (e) {\n  if (e.name === 'EmptyResultError') return [];\n  throw e;\n}","preventionTips":["Sanity-check the keyword renders results on pinterest.com before automating it","Broaden keywords before assuming the command is broken","Model empty results as a normal outcome in your pipeline, not a crash"],"tags":["empty-results","scraping","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}