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 {
|
} else {
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
success: false,
|
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,
|
success: false,
|
||||||
document: null,
|
document: null,
|
||||||
project_id: job.data.project_id,
|
project_id: job.data.project_id,
|
||||||
error:
|
error: error instanceof Error ? error : typeof error === "string" ? new Error(error) : new Error(JSON.stringify(error)),
|
||||||
"Something went wrong... Contact help@mendable.ai or try again." /* etc... */,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!job.data.v1 && (job.data.mode === "crawl" || job.data.crawl_id)) {
|
if (!job.data.v1 && (job.data.mode === "crawl" || job.data.crawl_id)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user