fix(queue-worker): don't send LLM extract hallucination error to Sentry
This commit is contained in:
@@ -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}`);
|
||||||
|
|
||||||
Sentry.captureException(error, {
|
if (!(error instanceof Error && error.message.includes("JSON parsing error(s): "))) {
|
||||||
data: {
|
Sentry.captureException(error, {
|
||||||
job: job.id,
|
data: {
|
||||||
},
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user