mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 20:16:03 +08:00
fix(WebScraper): fatal error handler triggering for 404s
This commit is contained in:
parent
4721aa1687
commit
d2f7031069
@ -421,7 +421,9 @@ export async function scrapSingleUrl(
|
||||
// }
|
||||
}
|
||||
|
||||
if (!text) {
|
||||
// NOTE: This exception for status codes may only work with fire-engine. In lieu of better error management,
|
||||
// it's the best we can do. - mogery
|
||||
if (!text && !Object.values(errors).some(x => x.startsWith("Request failed with status code "))) {
|
||||
throw new Error(`All scraping methods failed for URL: ${urlToScrap}`);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user