Skip to content

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

fix(scrapeURL/fire-engine): improved fix

Gergő Móricze17a711f6fcc
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 3945a5a45..cf859271f 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -1441,5 +1441,6 @@ export type GenerateLLMsTextRequest = z.infer<
export class TimeoutSignal extends Error {
constructor() {
super("Operation timed out");
+ this.name = "TimeoutSignal";
}
}
diff --git a/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts b/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts
index 4a6002512..840b350cc 100644
--- a/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts
@@ -137,7 +137,7 @@ async function performFireEngineScrape<
undefined,
production,
);
- throw error;
+ throw new TimeoutError("Fire-engine timed out while checking status", { cause: { errors, timeout } });
} else {
errors.push(error);
logger.debug(