{"record":{"id":"536308351c5826fd","repo":"jackwener/OpenCLI","slug":"could-not-resolve-board-username-slug-doe-536308","errorCode":null,"errorMessage":"Could not resolve board \"${username}/${slug}\" (does it exist and is it public?)","messagePattern":"Could not resolve board \"(.+?)/(.+?)\" \\(does it exist and is it public\\?\\)","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/pinterest/board-sections.js","lineNumber":32,"sourceCode":"  domain: 'www.pinterest.com',\n  strategy: Strategy.COOKIE,\n  args: [\n    { name: 'board', type: 'string', positional: true, required: true, help: '<username>/<slug>, a board URL, or a numeric board id, e.g. janedoe/my-board' },\n    { name: 'limit', type: 'int', default: DEFAULT_LIMIT, help: `Number of sections (max ${MAX_LIMIT})` },\n  ],\n  columns: ['sectionId', 'title', 'slug', 'pinCount', 'url'],\n  func: async (page, kwargs) => {\n    const limit = requireLimit(kwargs.limit, { fallback: DEFAULT_LIMIT, max: MAX_LIMIT });\n    const { username, slug, path, board: preloadedBoard } = await resolveBoardTarget(page, kwargs.board);\n\n    await page.goto(`${PINTEREST_BASE}${path}`);\n\n    // A board id argument already fetched the board, so only look it up when addressed by slug.\n    const board = preloadedBoard\n      || (await pinterestResourceFetch(page, 'BoardResource', { username, slug, field_set_key: 'detailed' }, path)).data;\n    const boardId = board && board.id;\n    if (!boardId) {\n      throw new CommandExecutionError(`Could not resolve board \"${username}/${slug}\" (does it exist and is it public?)`);\n    }\n\n    const { results } = await pinterestResourceFetch(\n      page,\n      'BoardSectionsResource',\n      { board_id: String(boardId) },\n      path,\n    );\n\n    const rows = results\n      .filter((section) => section && section.id)\n      .slice(0, limit)\n      .map((section) => ({\n        sectionId: String(section.id),\n        title: (section.title || '').trim(),\n        slug: section.slug || '',\n        pinCount: typeof section.pin_count === 'number' ? section.pin_count : 0,\n        url: section.slug ? `${PINTEREST_BASE}${path}${section.slug}/` : '',","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/pinterest/board-sections.js#L14-L50","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nawait cli.boardSections('someone/wrong-slug');\n// after\nawait cli.boardSections('someone', { board: '1234567890' }); // or corrected slug","handlingStrategy":"validation","validationCode":"if (!/^[^/]+\\/.+$/.test(boardArg)) throw new Error('pass board as username/slug');\n// verify existence out-of-band:\nconst res = await fetch(`https://pinterest.com/${boardArg}/`);\nif (!res.ok) throw new Error(`board ${boardArg} not public/missing`);","typeGuard":"function isResolvableBoard(b) {\n  return typeof b === 'string' && b.includes('/') && b.trim().length > 0;\n}","tryCatchPattern":"try {\n  const sections = await cli.boardSections('user/slug');\n} catch (e) {\n  if (/Could not resolve board/.test(e.message)) {\n    console.error('Board missing or private:', e.message); // fallback to id-based lookup\n  } else throw e;\n}","preventionTips":["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"],"tags":["pinterest","board-not-found","slug-resolution","cli"],"backgroundTag":"resource-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}