{"record":{"id":"7dc70e8771e2c723","repo":"jackwener/OpenCLI","slug":"no-bookmarks-found-for-the-logged-in-account","errorCode":null,"errorMessage":"No bookmarks found for the logged-in account","messagePattern":"No bookmarks found for the logged-in account","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/twitter/bookmarks.js","lineNumber":287,"sourceCode":"                count: useOutputFile ? outputCount : allTweets.length,\n                tweets: useOutputFile ? undefined : allTweets,\n                updatedAt: new Date().toISOString(),\n                complete: pageComplete,\n                source: 'bookmarks',\n                outputFile: useOutputFile ? outputFile : null,\n            });\n            if (pageComplete) {\n                exhausted = true;\n                break;\n            }\n            if (nextCursor === cursor) {\n                throw new CommandExecutionError('twitter_bookmarks_repeated_cursor: archive completion cannot be proven; resume state was retained');\n            }\n            cursor = nextCursor;\n        }\n        const finalCount = useOutputFile ? outputCount : allTweets.length;\n        if (finalCount === 0) {\n            throw new EmptyResultError('twitter bookmarks', 'No bookmarks found for the logged-in account');\n        }\n        // Resume is only removed after the timeline is truly exhausted. Hitting\n        // --max-pages, partial API errors after some rows, or an interrupt must\n        // leave the resume file so the next run can continue.\n        if (exhausted)\n            removeResumeFile(resumeFile);\n        if (useOutputFile) {\n            return {\n                outputFile,\n                count: outputCount,\n                source: 'bookmarks',\n                complete: exhausted,\n                pages,\n                ...(exhausted ? {} : { cursor, resumeFile: resumeFile || null }),\n            };\n        }\n        if (fetchAll && !exhausted) {\n            throw new CommandExecutionError(","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/twitter/bookmarks.js#L269-L305","documentation":"The bookmarks run completed (timeline exhausted or page budget hit) but produced zero records. clis/twitter/bookmarks.js:287 throws EmptyResultError('twitter bookmarks', 'No bookmarks found for the logged-in account') because an empty result is treated as a failure condition for the command rather than a silent success.","triggerScenarios":"After the pagination loop, finalCount (outputCount with --output-file, or allTweets.length in-memory) equals 0 — the API returned pages with no extractable bookmark tweets, or the timeline was genuinely empty.","commonSituations":"The account truly has no bookmarks; all entries were filtered as duplicates by the seen-set from a resumed run; a schema change caused parseBookmarks to extract nothing despite data being present; bookmarks hidden/limited by Twitter for the account.","solutions":["Confirm in the x.com UI that the logged-in account actually has bookmarks.","Check the raw API response — if tweets exist but were not parsed, parseBookmarks/extractBookmarkTweet need updating for the current schema.","If resuming, verify the seen-set/resume file is not incorrectly filtering all new tweets as duplicates.","If the account is genuinely empty, treat this as expected and handle EmptyResultError in your automation."],"exampleFix":"// before\ntwitter bookmarks --all  // account has no bookmarks\n// after: handle empty result explicitly\ntry { await runBookmarks(); } catch (e) { if (e.name === 'EmptyResultError') return []; throw e; }","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isNonEmptyArchive(result) {\n  return Array.isArray(result?.tweets) && result.tweets.length > 0;\n}","tryCatchPattern":"try {\n  const archive = await runBookmarks(argv);\n  return archive;\n} catch (e) {\n  if (e instanceof EmptyResultError) {\n    console.warn('Account has no bookmarks — treating as empty result.');\n    return [];\n  }\n  throw e;\n}","preventionTips":["Confirm the target account actually has bookmarks before automating.","After schema changes, verify parseBookmarks extracts rows from a sample payload.","When resuming, sanity-check that the seen-set is not filtering everything as duplicate.","Treat EmptyResultError distinctly from real failures in monitoring."],"tags":["empty-result","twitter","bookmarks"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}