mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 15:29:03 +08:00
fix(scrapeURL/pdf): even better timeout detection
This commit is contained in:
parent
8571b5a99d
commit
a7894a2714
@ -238,7 +238,10 @@ export async function scrapePDF(
|
|||||||
|| error instanceof TimeoutError
|
|| error instanceof TimeoutError
|
||||||
) {
|
) {
|
||||||
throw error;
|
throw error;
|
||||||
} else if (error instanceof Error && error.name === "TimeoutError") {
|
} else if (
|
||||||
|
(error instanceof Error && error.name === "TimeoutError")
|
||||||
|
|| (error instanceof Error && error.message === "Request failed" && error.cause && error.cause instanceof Error && error.cause.name === "TimeoutError")
|
||||||
|
) {
|
||||||
throw new TimeoutError("PDF parsing timed out, please increase the timeout parameter in your scrape request");
|
throw new TimeoutError("PDF parsing timed out, please increase the timeout parameter in your scrape request");
|
||||||
}
|
}
|
||||||
meta.logger.warn(
|
meta.logger.warn(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user