added 403s to sdk error handlers (#1357)

This commit is contained in:
Rafael Miller
2025-03-17 14:06:29 -03:00
committed by GitHub
parent d12feaea52
commit 6d3c639f58
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1388,7 +1388,7 @@ export default class FirecrawlApp {
* @param {string} action - The action being performed when the error occurred.
*/
handleError(response: AxiosResponse, action: string): void {
if ([400, 402, 408, 409, 500].includes(response.status)) {
if ([400, 402, 403, 408, 409, 500].includes(response.status)) {
const errorMessage: string =
response.data.error || "Unknown error occurred";
const details = response.data.details ? ` - ${JSON.stringify(response.data.details)}` : '';