Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(queue-worker): don't send LLM extract hallucination error to Sentry
Gergo Moriczf7c4cee404e1
diff --git a/apps/api/src/services/queue-worker.ts b/apps/api/src/services/queue-worker.tsindex ad0e4ad58..37e14bafe 100644--- a/apps/api/src/services/queue-worker.ts+++ b/apps/api/src/services/queue-worker.ts@@ -448,11 +448,13 @@ async function processJob(job: Job, token: string) {} catch (error) {Logger.error(`🐂 Job errored ${job.id} - ${error}`);- Sentry.captureException(error, {- data: {- job: job.id,- },- });+ if (!(error instanceof Error && error.message.includes("JSON parsing error(s): "))) {+ Sentry.captureException(error, {+ data: {+ job: job.id,+ },+ });+ }if (error instanceof CustomError) {// Here we handle the error, then save the failed job