{"record":{"id":"4399ec5e20553859","repo":"jackwener/OpenCLI","slug":"pinterest-user-boards","errorCode":null,"errorMessage":"pinterest user-boards","messagePattern":"pinterest user-boards","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/pinterest/user-boards.js","lineNumber":55,"sourceCode":"      sourceUrl,\n      limit,\n      keyField: 'boardId',\n      pageSize: DEFAULT_PAGE_SIZE,\n      mapItem: (board) => {\n        if (!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          sectionCount: typeof board.section_count === 'number' ? board.section_count : 0,\n          privacy: board.privacy || 'public',\n          url: board.url ? `${PINTEREST_BASE}${board.url}` : '',\n        };\n      },\n    });\n\n    if (rows.length === 0) {\n      throw new EmptyResultError('pinterest user-boards', `no boards found for user \"${username}\"`);\n    }\n    return rows;\n  },\n});\n","sourceCodeStart":37,"sourceCodeEnd":60,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/pinterest/user-boards.js#L37-L60","documentation":"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.","triggerScenarios":"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.","commonSituations":"Targeting brand accounts that keep boards secret, users who deleted their boards, banned or renamed accounts, and typos in the username.","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"],"exampleFix":"// before\nconst boards = await pinterest.userBoards({ username: 'janedoe' }); // throws if empty\n// after\ntry {\n  return await pinterest.userBoards({ username: 'janedoe' });\n} catch (e) {\n  if (e.name === 'EmptyResultError') return [];\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"if (!/^[A-Za-z0-9_]{3,}$/.test(username)) throw new Error('pre-check: username looks invalid');","typeGuard":null,"tryCatchPattern":"try { boards = await pinterest.userBoards({ username }); }\ncatch (e) {\n  if (e.name === 'EmptyResultError') return [];\n  throw e;\n}","preventionTips":["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"],"tags":["empty-results","scraping","user-profile"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}