Showing the changes to apps/python-sdk (1 of 5 files). Show all
Unified · Split
| @@ -48,7 +48,7 @@ class FirecrawlApp: · 47 unmodified lines | ||
| 48 | 48 | return response['data'] |
| 49 | 49 | else: |
| 50 | 50 | raise Exception(f'Failed to scrape URL. Error: {response["error"]}') |
| 51 | − elif response.status_code in [402, 409, 500]: | |
| 51 | + elif response.status_code in [402, 408, 409, 500]: | |
| 52 | 52 | error_message = response.json().get('error', 'Unknown error occurred') |
| 53 | 53 | raise Exception(f'Failed to scrape URL. Status code: {response.status_code}. Error: {error_message}') |
| 54 | 54 | else: |
| @@ -148,7 +148,7 @@ class FirecrawlApp: · 93 unmodified lines | ||
| 148 | 148 | self._handle_error(status_response, 'check crawl status') |
| 149 | 149 | |
| 150 | 150 | def _handle_error(self, response, action): |
| 151 | − if response.status_code in [402, 409, 500]: | |
| 151 | + if response.status_code in [402, 408, 409, 500]: | |
| 152 | 152 | error_message = response.json().get('error', 'Unknown error occurred') |
| 153 | 153 | raise Exception(f'Failed to {action}. Status code: {response.status_code}. Error: {error_message}') |
| 154 | 154 | else: |