mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 19:29:01 +08:00
Update extract.ts
This commit is contained in:
parent
2d37dca9dc
commit
05605112bb
@ -231,20 +231,7 @@ export async function extractController(
|
||||
return doc;
|
||||
} catch (e) {
|
||||
logger.error(`Error in extractController: ${e}`);
|
||||
if (
|
||||
e instanceof Error &&
|
||||
(e.message.startsWith("Job wait") || e.message === "timeout")
|
||||
) {
|
||||
throw {
|
||||
status: 408,
|
||||
error: "Request timed out",
|
||||
};
|
||||
} else {
|
||||
throw {
|
||||
status: 500,
|
||||
error: `(Internal server error) - ${e && e.message ? e.message : e}`,
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user