Skip to content

Commit 4a689d8

Browse files
committed
fix(billing): isolate per-admin email failures in org limit notifications
1 parent fb99d84 commit 4a689d8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/sim/lib/billing/core/limit-notifications.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,16 @@ export async function maybeSendLimitThresholdEmail(params: {
202202
if (!isOrgAdminRole(a.role)) continue
203203
if (a.enabled === false) continue
204204
if (!a.email) continue
205-
await sendTo(a.email, a.name || undefined)
205+
// Isolate per-admin failures so one bad recipient doesn't skip the rest.
206+
try {
207+
await sendTo(a.email, a.name || undefined)
208+
} catch (sendError) {
209+
logger.error('Failed to send limit email to org admin', {
210+
category,
211+
email: a.email,
212+
error: sendError,
213+
})
214+
}
206215
}
207216
}
208217

0 commit comments

Comments
 (0)