TidyLinker.com
TypeScript
Issue Opened
Issue #139 opened: Throttle Resend API calls in admin nudge bulk command
Problem
Sentry is repeatedly capturing Symfony\Component\Mailer\Exception\TransportException: Request to the Resend API failed. Reason: Too many requests. You can only make 5 requests per second. on /admin/nudge/bulk.
Sentry issues:
- TIDY-LINKER-2W — 4 events
- TIDY-LINKER-2X — 1 event
- TIDY-LINKER-2Z — 1 event
Cause
Bulk nudge sends emails synchronously without rate limiting. Resend caps at 5 requests/sec.
Fix
- Push individual nudge sends onto the queue via
ShouldQueuenotifications, OR - Insert a
usleep(250_000)between sends inside the bulk loop, OR - Wrap with Laravel's
RateLimiter/ useBus::batchwith a throttle middleware.
Queueing is the cleanest fix and aligns with how other transactional emails are sent.