mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 17:49:02 +08:00
fix(scrapeURL/pdf): better timeout error
This commit is contained in:
parent
bfe731309c
commit
f41af8241e
@ -233,8 +233,13 @@ export async function scrapePDF(
|
|||||||
base64Content,
|
base64Content,
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof RemoveFeatureError) {
|
if (
|
||||||
|
error instanceof RemoveFeatureError
|
||||||
|
|| error instanceof TimeoutError
|
||||||
|
) {
|
||||||
throw error;
|
throw error;
|
||||||
|
} else if (error instanceof Error && error.name === "TimeoutError") {
|
||||||
|
throw new TimeoutError("PDF parsing timed out, please increase the timeout parameter in your scrape request");
|
||||||
}
|
}
|
||||||
meta.logger.warn(
|
meta.logger.warn(
|
||||||
"RunPod MU failed to parse PDF (could be due to timeout) -- falling back to parse-pdf",
|
"RunPod MU failed to parse PDF (could be due to timeout) -- falling back to parse-pdf",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user