From 7ae97786428f7c7911a232f8eea1c07e189f6726 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 10 Jun 2024 16:57:31 -0700 Subject: [PATCH] Update single_url.ts --- apps/api/src/scraper/WebScraper/single_url.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/api/src/scraper/WebScraper/single_url.ts b/apps/api/src/scraper/WebScraper/single_url.ts index 9a61888..c2dcea1 100644 --- a/apps/api/src/scraper/WebScraper/single_url.ts +++ b/apps/api/src/scraper/WebScraper/single_url.ts @@ -96,7 +96,11 @@ export async function scrapWithFireEngine( return { html: html ?? "", screenshot: screenshot ?? "" }; } } catch (error) { - console.error(`[Fire-Engine][c] Error fetching url: ${url} -> ${error}`); + if (error.code === 'ECONNABORTED') { + console.log(`[Fire-Engine] Request timed out for ${url}`); + } else { + console.error(`[Fire-Engine][c] Error fetching url: ${url} -> ${error}`); + } return { html: "", screenshot: "" }; } }