fix(v0, sentry): don't send all scraping methods failed errors to Sentry

This commit is contained in:
Gergő Móricz 2024-09-23 18:40:21 +02:00
parent d2f7031069
commit 83d8287c14
1 changed files with 2 additions and 2 deletions

View File

@ -283,8 +283,6 @@ export async function scrapeController(req: Request, res: Response) {
return res.status(result.returnCode).json(result);
} catch (error) {
Sentry.captureException(error);
Logger.error(error);
if (typeof error === "string" && error.startsWith("{\"type\":\"all\",")) {
return res.status(500).json({
success: false,
@ -292,6 +290,8 @@ export async function scrapeController(req: Request, res: Response) {
details: JSON.parse(error).errors as string[],
});
} else {
Sentry.captureException(error);
Logger.error(error);
return res.status(500).json({
error:
typeof error === "string"