From 20434856e9b73c85f658048c15906197f7028a18 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Thu, 3 Jul 2025 18:02:08 -0300 Subject: [PATCH] fix: Don't continue retrying SMS reminders infinitely (#22251) * fix: Don't continue retrying SMS reminders infinitely * Update packages/features/ee/workflows/api/scheduleSMSReminders.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --- packages/features/ee/workflows/api/scheduleSMSReminders.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/features/ee/workflows/api/scheduleSMSReminders.ts b/packages/features/ee/workflows/api/scheduleSMSReminders.ts index a399f94ee9..6851509490 100644 --- a/packages/features/ee/workflows/api/scheduleSMSReminders.ts +++ b/packages/features/ee/workflows/api/scheduleSMSReminders.ts @@ -37,6 +37,9 @@ export async function handler(req: NextRequest) { scheduledDate: { lte: dayjs().add(2, "hour").toISOString(), }, + retryCount: { + lt: 3, // Don't continue retrying if it's already failed 3 times + }, }, select: { ...select,