{"record":{"id":"18983653b6f2a5d8","repo":"jackwener/OpenCLI","slug":"result-detail-189836","errorCode":null,"errorMessage":"${result.detail}","messagePattern":"\\$\\{result\\.detail\\}","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/reddit/read.js","lineNumber":566,"sourceCode":"          });\n        }\n\n        // If we produced nothing beyond the POST row but the comment listing\n        // wasn't empty, that's parser drift (e.g. Reddit changed t1/more\n        // schema). Surface as CommandExecutionError on the Node side.\n        if (rows.length <= 1 && preWalkSize > 0 && t1TopLevel.length > 0) {\n          return { kind: 'parser-drift', detail: 'Reddit comment listing for post ' + postId + ' had ' + t1TopLevel.length + ' t1 entries but walker produced no rows.' };\n        }\n\n        return { kind: 'ok', rows: rows, expandMeta: expandMeta };\n      })()\n    `);\n\n        if (!result || typeof result !== 'object') {\n            throw new CommandExecutionError('Reddit /comments fetch returned no result envelope.');\n        }\n        if (result.kind === 'inaccessible') {\n            throw new EmptyResultError(result.detail);\n        }\n        if (result.kind === 'auth') {\n            throw new AuthRequiredError('reddit.com', result.detail);\n        }\n        if (result.kind === 'http') {\n            throw new CommandExecutionError(`HTTP ${result.httpStatus} from ${result.where}`);\n        }\n        if (result.kind === 'malformed') {\n            throw new CommandExecutionError(result.detail);\n        }\n        if (result.kind === 'parser-drift') {\n            throw new CommandExecutionError(result.detail);\n        }\n        if (result.kind === 'expand-failed') {\n            throw new CommandExecutionError(result.detail);\n        }\n        if (result.kind !== 'ok' || !Array.isArray(result.rows)) {\n            throw new CommandExecutionError(`Unexpected result from reddit read: ${JSON.stringify(result)}`);","sourceCodeStart":548,"sourceCodeEnd":584,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/reddit/read.js#L548-L584","documentation":"The page script classifies fetch outcomes into envelope kinds; kind 'inaccessible' means the post could not be accessed (e.g. removed, deleted, private subreddit, quarantined, or banned). The detail string is surfaced as an EmptyResultError, telling the caller the fetch succeeded mechanically but there is no readable content.","triggerScenarios":"Fetching a deleted/removed post, a post in a private or banned subreddit, or a post requiring login/age verification that the current session cannot view.","commonSituations":"Post was deleted after you saved its id; subreddit went private; [removed] by moderators; region or age-gated content with insufficient cookies.","solutions":["Verify the post still exists by opening the URL in a logged-in browser.","Ensure session cookies grant access (join/login to the subreddit if private or age-gated).","Treat as expected-empty in automation: catch EmptyResultError and skip the post id."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"null","tryCatchPattern":"try {\n  const rows = await redditRead(postId);\n} catch (e) {\n  if (e instanceof EmptyResultError) {\n    console.warn(`Post ${postId} inaccessible: ${e.message}; skipping`);\n    return [];\n  }\n  throw e;\n}","preventionTips":["Check posts exist in a logged-in browser before batch-processing saved ids.","Maintain valid session cookies for private/age-gated subreddits.","Treat EmptyResultError as expected-empty in pipelines and continue rather than aborting."],"tags":["empty-result","access-control","reddit"],"backgroundTag":"content-inaccessible","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}