CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(api): graceful 503 on email send when Redis/MTA unavailable #4055

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/code-audit-vapron-migration-6jya3kmainopened Jun 15, 20260/2 tasks
ccantynzcommented Jun 15, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/76


Summary

  • POST /v1/messages/send: Previously crashed with a raw 500 if Redis was down or the MTA worker wasn't running. Now returns HTTP 503 with "Email saved but delivery queue unavailable. The MTA worker may not be running. Check REDIS_URL and alecrae-mta service." — email is still saved to DB, user gets a clear diagnostic
  • CLAUDE.md: Added issue #42 (MTA worker not running — now has runbook), updated issue #5 (Vercel fully resolved), updated current-focus block to reflect live box state + three remaining Craig tasks

Context

The MTA worker (services/mta) runs as a separate process consuming BullMQ jobs from Redis. Until Redis and alecrae-mta are set up on the box, every compose+send would crash with a 500. This makes the failure graceful and diagnosable.

Test plan

  • Start box without Redis running → POST /v1/messages/send returns 503 with the diagnostic message (not 500)
  • Start Redis → POST /v1/messages/send returns 202 as before

https://claude.ai/code/session_017mhAkS4qhMjcvVnyFi61xp


Generated by Claude Code

ccantynzcommented Jun 15, 2026

Originally written by @vercel[bot] on GitHub.


Deployment failed with the following error:

There is no GitHub account connected to this Vercel account.
ccantynzcommented Jun 15, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
alec-rae-com-admin Error Error Jun 15, 2026 11:45pm

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts