{"record":{"id":"3f167f0b37b0f864","repo":"jackwener/OpenCLI","slug":"linkedin-salesnav-inbox","errorCode":null,"errorMessage":"linkedin salesnav-inbox","messagePattern":"linkedin salesnav-inbox","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/linkedin/salesnav-inbox.js","lineNumber":191,"sourceCode":"  strategy: Strategy.UI,\n  browser: true,\n  args: [\n    { name: 'limit', type: 'number', default: DEFAULT_LIMIT, help: 'Maximum conversations to return (1-500)' },\n    { name: 'max-pages', type: 'number', default: 30, help: 'Maximum Sales Navigator API pages to fetch' },\n    { name: 'unread-only', type: 'bool', default: false, help: 'Return only unread conversations' },\n  ],\n  columns: ['rank', 'thread_id', 'thread_url', 'person_name', 'last_message_snippet', 'last_activity_time', 'unread', 'unread_count', 'total_message_count', 'archived', 'participants', 'next_page_starts_at'],\n  func: async (page, args) => {\n    if (!page) throw new CommandExecutionError('Browser session required for linkedin salesnav-inbox');\n    const limit = parseLimit(args.limit);\n    const maxPages = parseLimit(args['max-pages'], 30);\n    await page.goto(SALES_INBOX_URL);\n    await page.wait(4);\n    let rows = await fetchInboxRows(page, { limit, maxPages });\n    if (args['unread-only']) rows = rows.filter((row) => row.unread);\n    if (rows.length === 0) {\n      if (args['unread-only']) return [];\n      throw new EmptyResultError('linkedin salesnav-inbox', 'No Sales Navigator conversations were found.');\n    }\n    return rows.slice(0, limit).map((row, index) => ({ ...row, rank: index + 1 }));\n  },\n});\n\nexport const __test__ = {\n  THREAD_DECORATION,\n  normalizeWhitespace,\n  parseLimit,\n  encodeRestliDecoration,\n  salesnavThreadUrl,\n  threadListUrl,\n  parseSalesnavThreads,\n  fetchInboxRows,\n};\n","sourceCodeStart":173,"sourceCodeEnd":207,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/linkedin/salesnav-inbox.js#L173-L207","documentation":"This is an EmptyResultError raised when the Sales Navigator inbox was fetched successfully but contained zero conversations (and --unread-only was not set). The library surfaces the command name plus a human-readable reason instead of returning an empty result set.","triggerScenarios":"fetchInboxRows returns an empty rows array and args['unread-only'] is falsy — the inbox pagination completed with no threads found.","commonSituations":"Brand-new or empty Sales Navigator account; logged into the wrong LinkedIn account; inbox UI failed to load threads despite page.goto succeeding (slow load, region restrictions); all conversations were archived or deleted.","solutions":["Verify the expected inbox has conversations by checking linkedin.com/sales/inbox in the browser.","Confirm the browser session is logged into the intended LinkedIn/Sales Navigator account.","Re-run with a longer wait or retry if the inbox UI was still loading.","If you only want unread threads, pass --unread-only so an empty result returns [] instead of throwing."],"exampleFix":"// before\nlinkedin salesnav-inbox\n// after\nlinkedin salesnav-inbox --unread-only  // returns [] gracefully when none match","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const rows = await run('linkedin salesnav-inbox'); } catch (e) { if (e.name === 'EmptyResultError' || /No Sales Navigator conversations/.test(e.message)) return []; throw e; }","preventionTips":["Pass --unread-only when empty results are acceptable (returns []).","Verify the account actually has conversations before automating.","Confirm you're logged into the expected Sales Navigator account.","Retry once if the inbox UI may have been slow to load."],"tags":["empty-result","sales-navigator","scraping"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}