0

Nick: v21

This commit is contained in:
Nicolas 2024-05-13 19:54:12 -07:00
parent aa0c8188c9
commit 512449e1aa
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ export default class FirecrawlApp {
* @param {string} action - The action being performed when the error occurred. * @param {string} action - The action being performed when the error occurred.
*/ */
handleError(response, action) { handleError(response, action) {
if ([402, 409, 500].includes(response.status)) { if ([402, 408, 409, 500].includes(response.status)) {
const errorMessage = response.data.error || "Unknown error occurred"; const errorMessage = response.data.error || "Unknown error occurred";
throw new Error(`Failed to ${action}. Status code: ${response.status}. Error: ${errorMessage}`); throw new Error(`Failed to ${action}. Status code: ${response.status}. Error: ${errorMessage}`);
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@mendable/firecrawl-js", "name": "@mendable/firecrawl-js",
"version": "0.0.20", "version": "0.0.21",
"description": "JavaScript SDK for Firecrawl API", "description": "JavaScript SDK for Firecrawl API",
"main": "build/index.js", "main": "build/index.js",
"types": "types/index.d.ts", "types": "types/index.d.ts",