Merge pull request #759 from mendableai/fix/issue-758

[BUG] Fixed missing error handling in JS-SDK
This commit is contained in:
Nicolas 2024-10-10 17:41:50 -03:00 committed by GitHub
commit 5844b5bb5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -287,7 +287,7 @@ export default class FirecrawlApp {
this.handleError(response, "scrape URL"); this.handleError(response, "scrape URL");
} }
} catch (error: any) { } catch (error: any) {
throw new FirecrawlError(error.message, 500); this.handleError(error.response, "scrape URL");
} }
return { success: false, error: "Internal server error." }; return { success: false, error: "Internal server error." };
} }