Skip to content

Commit 3cf4f7d

Browse files
committed
fix(webhooks): include NULL failedCount in markWebhookSuccess guard
1 parent 4baad33 commit 3cf4f7d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/sim/lib/webhooks/polling/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export async function markWebhookSuccess(webhookId: string, logger: Logger): Pro
6161
failedCount: 0,
6262
updatedAt: new Date(),
6363
})
64-
.where(and(eq(webhook.id, webhookId), ne(webhook.failedCount, 0)))
64+
.where(
65+
and(eq(webhook.id, webhookId), or(isNull(webhook.failedCount), ne(webhook.failedCount, 0)))
66+
)
6567
} catch (err) {
6668
logger.error(`Failed to mark webhook ${webhookId} as successful:`, err)
6769
}

0 commit comments

Comments
 (0)