Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update single_url.ts

rafaelsideguide16aac7f8c58a
diff --git a/apps/api/src/scraper/WebScraper/single_url.ts b/apps/api/src/scraper/WebScraper/single_url.ts
index a4e4217a6..8c9503c81 100644
--- a/apps/api/src/scraper/WebScraper/single_url.ts
+++ b/apps/api/src/scraper/WebScraper/single_url.ts
@@ -443,8 +443,10 @@ export async function scrapSingleUrl(
if (attempt.pageStatusCode) {
pageStatusCode = attempt.pageStatusCode;
}
- if (attempt.pageError) {
+ if (attempt.pageError && attempt.pageStatusCode != 200) {
pageError = attempt.pageError;
+ } else {
+ pageError = undefined;
}