Skip to content

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

fix wrapped file size limit errors (#4248)

rowinsg4b1e6e7c2670
diff --git a/apps/api/src/scraper/scrapeURL/engines/fire-engine/checkStatus.ts b/apps/api/src/scraper/scrapeURL/engines/fire-engine/checkStatus.ts
index 2a8d78434..8f53690b0 100644
--- a/apps/api/src/scraper/scrapeURL/engines/fire-engine/checkStatus.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/fire-engine/checkStatus.ts
@@ -237,7 +237,9 @@ export async function fireEngineCheckStatus(
typeof status.error === "string" &&
status.error.includes("File exceeds size limit")
) {
- throw new UnsupportedFileError(status.error);
+ throw new UnsupportedFileError(
+ status.error.slice(status.error.indexOf("File exceeds size limit")),
+ );
} else if (
typeof status.error === "string" &&
status.error.includes("failed to finish without timing out")
diff --git a/apps/api/src/scraper/scrapeURL/engines/fire-engine/scrape.ts b/apps/api/src/scraper/scrapeURL/engines/fire-engine/scrape.ts
index dddaaf509..cde9e009a 100644
--- a/apps/api/src/scraper/scrapeURL/engines/fire-engine/scrape.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/fire-engine/scrape.ts
@@ -273,7 +273,9 @@ export async function fireEngineScrape<
typeof status.error === "string" &&
status.error.includes("File exceeds size limit")
) {
- throw new UnsupportedFileError(status.error);
+ throw new UnsupportedFileError(
+ status.error.slice(status.error.indexOf("File exceeds size limit")),
+ );
} else if (
typeof status.error === "string" &&
status.error.includes("failed to finish without timing out")