fix(v0/search): don't sent scrape fail errors to Sentry

This commit is contained in:
Gergő Móricz 2024-09-23 18:49:27 +02:00
parent d927cafeea
commit 483f97d21b
1 changed files with 3 additions and 1 deletions

View File

@ -196,7 +196,9 @@ export async function searchController(req: Request, res: Response) {
return res.status(408).json({ error: "Request timed out" });
}
Sentry.captureException(error);
if (!(error instanceof Error && error.message.startsWith('{"type":"all",'))) {
Sentry.captureException(error);
}
Logger.error(error);
return res.status(500).json({ error: error.message });
}