{"record":{"id":"492bb9653b7551e1","repo":"jackwener/OpenCLI","slug":"www-reuters-com","errorCode":null,"errorMessage":"www.reuters.com","messagePattern":"www\\.reuters\\.com","errorType":"exception","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/reuters/article-detail.js","lineNumber":39,"sourceCode":"        { name: 'url', required: true, positional: true, help: 'Reuters article URL (must be on reuters.com)' },\n    ],\n    columns: ['title', 'date', 'section', 'section_path', 'authors', 'description', 'word_count', 'url', 'body'],\n    func: async (page, kwargs) => {\n        const url = String(kwargs.url || '').trim();\n        if (!url) {\n            throw new ArgumentError('Article URL cannot be empty');\n        }\n        if (!REUTERS_HOST.test(url)) {\n            throw new ArgumentError(`URL must be on reuters.com, got ${url}`);\n        }\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":21,"sourceCodeEnd":54,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/reuters/article-detail.js#L21-L54","documentation":"The command throws AuthRequiredError for www.reuters.com when the in-page script reports result.authRequired, meaning the page is gated by login, subscription, or human verification. Reuters paywalls much of its content, so the tool refuses to proceed and tells the caller authentication is needed.","triggerScenarios":"Loading the article URL yields a paywall, login wall, or bot/human-verification page; the scraping script detects this state and sets authRequired, so the command raises AuthRequiredError instead of returning partial data.","commonSituations":"Reading paywalled subscriber-only articles without an authenticated session; Reuters bot-detection flagging the automated browser; region-locked content requiring sign-in; exhausted free-article quota for anonymous readers.","solutions":["Run the site's auth/login command to establish an authenticated reuters.com session","Verify the session is still valid (re-login if credentials expired)","Try a non-paywalled article to confirm the session works","If bot-verification is the cause, slow down or use a warmer session"],"exampleFix":"// before\nreuters article-detail \"https://www.reuters.com/markets/paywalled-article/\"  # AuthRequiredError\n// after\nreuters auth login           # establish reuters.com session\nreuters article-detail \"https://www.reuters.com/markets/paywalled-article/\"","handlingStrategy":"fallback","validationCode":"null","typeGuard":"null","tryCatchPattern":"try {\n  return await reutersArticleDetail(url);\n} catch (e) {\n  if (e instanceof AuthRequiredError || /gated by login/.test(String(e.message))) {\n    await runSiteAuthLogin('reuters');\n    return await reutersArticleDetail(url);\n  }\n  throw e;\n}","preventionTips":["Establish an authenticated reuters.com session before fetching paywalled articles","Check session validity periodically","Prefer non-paywalled articles in automated pipelines","Handle AuthRequiredError by triggering the login flow, not by retrying blind"],"tags":["auth","paywall","scraping"],"backgroundTag":"auth-required-paywall","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}