{"record":{"id":"68e9b2e1907087f1","repo":"jackwener/OpenCLI","slug":"board-username-slug-has-no-sections","errorCode":null,"errorMessage":"board \"${username}/${slug}\" has no sections","messagePattern":"board \"(.+?)/(.+?)\" has no sections","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/pinterest/board-sections.js","lineNumber":54,"sourceCode":"      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}/` : '',\n      }));\n\n    if (rows.length === 0) {\n      throw new EmptyResultError('pinterest board-sections', `board \"${username}/${slug}\" has no sections`);\n    }\n    return rows;\n  },\n});\n","sourceCodeStart":36,"sourceCodeEnd":59,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/pinterest/board-sections.js#L36-L59","documentation":"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.","triggerScenarios":"Calling `pinterest board-sections <username>/<slug>` on a board that exists and is public but whose pins are all unsectioned (no custom sections created).","commonSituations":"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.","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."],"exampleFix":"// before\nconst sections = await cli.boardSections('user/board');\n// after\nlet sections = [];\ntry { sections = await cli.boardSections('user/board'); } catch (e) { /* no sections is fine */ }","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"try {\n  const sections = await cli.boardSections('user/board');\n} catch (e) {\n  if (/has no sections/.test(e.message)) {\n    const sections = []; // empty is valid\n  } else throw e;\n}","preventionTips":["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"],"tags":["pinterest","empty-result","board-sections","cli"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}