From 68a4c2e402b735ac52e1162930d4bf94b82c7800 Mon Sep 17 00:00:00 2001 From: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:29:35 -0300 Subject: [PATCH] Fixed missing error handling in JS-SDK --- apps/js-sdk/firecrawl/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/js-sdk/firecrawl/src/index.ts b/apps/js-sdk/firecrawl/src/index.ts index a6215037..8f1c7545 100644 --- a/apps/js-sdk/firecrawl/src/index.ts +++ b/apps/js-sdk/firecrawl/src/index.ts @@ -287,7 +287,7 @@ export default class FirecrawlApp { this.handleError(response, "scrape URL"); } } catch (error: any) { - throw new FirecrawlError(error.message, 500); + this.handleError(error.response, "scrape URL"); } return { success: false, error: "Internal server error." }; }