{"record":{"id":"fe79d93b98ccd986","repo":"jackwener/OpenCLI","slug":"reuters-article-detail","errorCode":null,"errorMessage":"reuters article-detail","messagePattern":"reuters article-detail","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/reuters/article-detail.js","lineNumber":49,"sourceCode":"        }\n        await page.goto(url);\n        await page.wait(2);\n        const result = await page.evaluate(buildArticleDetailScript());\n        if (result?.error) {\n            throw new CommandExecutionError(`Reuters article-detail failed inside the page: ${result.error}`);\n        }\n        if (result?.authRequired) {\n            throw new AuthRequiredError('www.reuters.com', 'Reuters article-detail is gated by login, subscription, or human verification');\n        }\n        if (!result || result.ok !== true) {\n            throw new CommandExecutionError(\n                'Reuters article-detail returned no payload',\n                'Check that the URL points to a Reuters article and that the page loaded',\n            );\n        }\n        const detail = mapArticleDetail(result.body?.article, result.body?.bodyText, url);\n        if (!detail || (!detail.title && !detail.body)) {\n            throw new EmptyResultError('reuters article-detail', 'Page rendered no article body — likely paywalled or a non-article URL');\n        }\n        return [detail];\n    },\n});\n","sourceCodeStart":31,"sourceCodeEnd":54,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/reuters/article-detail.js#L31-L54","documentation":"The command throws EmptyResultError('reuters article-detail', ...) when mapArticleDetail produced no usable detail — neither a title nor a body. The page technically rendered, but extraction found no article content, which the library attributes to a paywall or a non-article URL.","triggerScenarios":"The page evaluates successfully and passes the payload checks, but the mapped detail has empty title and body — e.g. the URL is a section/listing page, a removed article stub, or a consent shell that renders no article DOM.","commonSituations":"Pointing the command at a reuters.com section page or author page instead of an article; the article was deleted so only a stub renders; a client-side paywall stripping body content before the script runs.","solutions":["Confirm the URL is a direct article permalink, not a section/topic page","Try another article to distinguish URL-specific vs systemic issues","Authenticate (auth login) to rule out soft paywall stripping the body","Report a bug if valid article pages consistently yield empty results"],"exampleFix":"// before\nreuters article-detail \"https://www.reuters.com/world/us/\"   # section page -> EmptyResultError\n// after\nreuters article-detail \"https://www.reuters.com/world/us/specific-article-slug-2026-08-29/\"","handlingStrategy":"fallback","validationCode":"// check the URL looks like an article permalink (slug + id), not a section page\nif (!/reuters\\.\\w+\\/[\\w-]+\\/[\\w-]+\\/[\\w-]+-\\d{4}-\\d{2}-\\d{2}\\//.test(url)) {\n  console.warn('URL does not look like an article permalink');\n}","typeGuard":"null","tryCatchPattern":"try {\n  return await reutersArticleDetail(url);\n} catch (e) {\n  if (e instanceof EmptyResultError || /no article body/.test(String(e.message))) {\n    console.warn('No article content — URL may be a section page or paywalled');\n    return null;\n  }\n  throw e;\n}","preventionTips":["Use article permalinks, never section/topic/author pages","Authenticate to avoid soft paywalls stripping the body","Treat empty title+body as a URL problem first, tool bug second","Skip-and-log instead of failing whole batch jobs on empty results"],"tags":["scraping","empty-result","paywall"],"backgroundTag":"empty-scrape-result","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}