mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-13 14:49:00 +08:00
Update extract.ts
This commit is contained in:
parent
2d37dca9dc
commit
05605112bb
@ -231,20 +231,7 @@ export async function extractController(
|
|||||||
return doc;
|
return doc;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error(`Error in extractController: ${e}`);
|
logger.error(`Error in extractController: ${e}`);
|
||||||
if (
|
return null;
|
||||||
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}`,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user