Skip to content

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

Update single_url.ts

Nicolas066d92f643a6
diff --git a/apps/api/src/scraper/WebScraper/single_url.ts b/apps/api/src/scraper/WebScraper/single_url.ts
index cc1624560..d24e5c2e4 100644
--- a/apps/api/src/scraper/WebScraper/single_url.ts
+++ b/apps/api/src/scraper/WebScraper/single_url.ts
@@ -290,7 +290,7 @@ export async function scrapSingleUrl(
}
if (attempt.pageError && attempt.pageStatusCode >= 400) {
pageError = attempt.pageError;
- } else if (attempt.pageStatusCode < 400) {
+ } else if (attempt && attempt.pageStatusCode && attempt.pageStatusCode < 400) {
pageError = undefined;
}