jackwener/OpenCLI · error · CommandExecutionError
Reuters article-detail returned no payload
Error message
Reuters article-detail returned no payload
What it means
The command throws CommandExecutionError('Reuters article-detail returned no payload') when the in-page script completed but result is null/undefined or result.ok !== true and no more specific error (page error, authRequired) was set. It guards against the scraper silently producing nothing usable.
Source
Thrown at clis/reuters/article-detail.js:42
func: async (page, kwargs) => {
const url = String(kwargs.url || '').trim();
if (!url) {
throw new ArgumentError('Article URL cannot be empty');
}
if (!REUTERS_HOST.test(url)) {
throw new ArgumentError(`URL must be on reuters.com, got ${url}`);
}
await page.goto(url);
await page.wait(2);
const result = await page.evaluate(buildArticleDetailScript());
if (result?.error) {
throw new CommandExecutionError(`Reuters article-detail failed inside the page: ${result.error}`);
}
if (result?.authRequired) {
throw new AuthRequiredError('www.reuters.com', 'Reuters article-detail is gated by login, subscription, or human verification');
}
if (!result || result.ok !== true) {
throw new CommandExecutionError(
'Reuters article-detail returned no payload',
'Check that the URL points to a Reuters article and that the page loaded',
);
}
const detail = mapArticleDetail(result.body?.article, result.body?.bodyText, url);
if (!detail || (!detail.title && !detail.body)) {
throw new EmptyResultError('reuters article-detail', 'Page rendered no article body — likely paywalled or a non-article URL');
}
return [detail];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Retry — timing/interstitial issues often resolve on another attempt
- Increase dwell time or re-run while the page is fully settled if you control the wrapper
- Verify the URL is a genuine reuters.com article
- Report a bug with the URL if it reproduces consistently
Defensive patterns
Strategy: retry
Validate before calling
null
Type guard
null
Try / catch
try {
return await reutersArticleDetail(url);
} catch (e) {
if (String(e.message).includes('returned no payload')) {
await sleep(3000);
return await reutersArticleDetail(url); // one retry for slow loads/interstitials
}
throw e;
} Prevention
- Allow pages to fully settle before scraping
- Retry once on empty-payload errors
- Validate the URL is an article, not a shell page
- Track recurrence to detect Reuters frontend changes
When it happens
Trigger: page.evaluate returns null/undefined (script did not run or returned nothing) or returns an object whose ok flag is not exactly true, without setting error or authRequired.
Common situations: Page loaded a soft interstitial the script did not classify; script returned an unexpected shape after a Reuters frontend update; evaluate serialization dropped the result; navigation raced with page.wait(2) and content was still loading.
Related errors
- No papers found for: ${data.name || author}
- 1point3acres thread
- 1point3acres user
- amazon ${definition.commandName} did not expose any ranked i
- amazon search did not expose any product cards
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/9dfab5046963e010.
Report an issue: GitHub.