Skip to content

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

Fixed missing error handling in JS-SDK

rafaelsideguide68a4c2e402b7
diff --git a/apps/js-sdk/firecrawl/src/index.ts b/apps/js-sdk/firecrawl/src/index.ts
index a62150373..8f1c75452 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." };
}