fix(queue-worker): don't send LLM extract hallucination error to Sentry

This commit is contained in:
Gergo Moricz
2024-09-13 14:02:49 +02:00
parent 0d1b46d476
commit f7c4cee404
+2
View File
@@ -448,11 +448,13 @@ async function processJob(job: Job, token: string) {
} catch (error) { } catch (error) {
Logger.error(`🐂 Job errored ${job.id} - ${error}`); Logger.error(`🐂 Job errored ${job.id} - ${error}`);
if (!(error instanceof Error && error.message.includes("JSON parsing error(s): "))) {
Sentry.captureException(error, { Sentry.captureException(error, {
data: { data: {
job: job.id, job: job.id,
}, },
}); });
}
if (error instanceof CustomError) { if (error instanceof CustomError) {
// Here we handle the error, then save the failed job // Here we handle the error, then save the failed job