mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
fix(scrapeURL): error displaying
This commit is contained in:
parent
79cadcb769
commit
a297c99ba8
|
@ -64,7 +64,7 @@ export async function scrapeController(
|
|||
} else {
|
||||
return res.status(500).json({
|
||||
success: false,
|
||||
error: `(Internal server error) - ${e && e?.message ? e.message : e}`,
|
||||
error: `(Internal server error) - ${(e && e.message) ? e.message : e}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -488,8 +488,7 @@ async function processJob(job: Job & { id: string }, token: string) {
|
|||
success: false,
|
||||
document: null,
|
||||
project_id: job.data.project_id,
|
||||
error:
|
||||
"Something went wrong... Contact help@mendable.ai or try again." /* etc... */,
|
||||
error: error instanceof Error ? error : typeof error === "string" ? new Error(error) : new Error(JSON.stringify(error)),
|
||||
};
|
||||
|
||||
if (!job.data.v1 && (job.data.mode === "crawl" || job.data.crawl_id)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user