mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-04 11:40:40 +08:00
fix(v0, sentry): don't send all scraping methods failed errors to Sentry
This commit is contained in:
parent
d2f7031069
commit
83d8287c14
@ -283,8 +283,6 @@ export async function scrapeController(req: Request, res: Response) {
|
|||||||
|
|
||||||
return res.status(result.returnCode).json(result);
|
return res.status(result.returnCode).json(result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Sentry.captureException(error);
|
|
||||||
Logger.error(error);
|
|
||||||
if (typeof error === "string" && error.startsWith("{\"type\":\"all\",")) {
|
if (typeof error === "string" && error.startsWith("{\"type\":\"all\",")) {
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
success: false,
|
success: false,
|
||||||
@ -292,6 +290,8 @@ export async function scrapeController(req: Request, res: Response) {
|
|||||||
details: JSON.parse(error).errors as string[],
|
details: JSON.parse(error).errors as string[],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Sentry.captureException(error);
|
||||||
|
Logger.error(error);
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
error:
|
error:
|
||||||
typeof error === "string"
|
typeof error === "string"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user