From a44b3efeb7d8b2c486149639fbfb60e8b9570598 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Fri, 27 Sep 2024 17:02:20 -0700 Subject: [PATCH] fix: allow errors to propogate in integration sync to facilitate retries unless final attempt --- backend/src/services/secret/secret-queue.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/services/secret/secret-queue.ts b/backend/src/services/secret/secret-queue.ts index ce9c58391..ff4fa595f 100644 --- a/backend/src/services/secret/secret-queue.ts +++ b/backend/src/services/secret/secret-queue.ts @@ -930,6 +930,11 @@ export const secretQueueFactory = ({ } }); + // re-throw error to re-run job unless final attempt, then log and send fail email + if (job.attemptsStarted !== job.opts.attempts) { + throw err; + } + await integrationDAL.updateById(integration.id, { lastSyncJobId: job.id, syncMessage: message,