Return 422 (not 500) when member has no mailbox

FixEmailService
Shipped
July 1, 2026 at 9:11 AM UTC
Author
Sage
Commit
1bd8dd0

listFolders and other read endpoints threw IllegalStateException from MailContext.toMailCredentials() when a member had no IMAP credentials provisioned, which the controller's catch-all turned into a 500. Add MailboxNotConfiguredException (a CapabilityNotSupportedException subclass, so it rides the existing rethrow paths) mapped to 422 MAILBOX_NOT_CONFIGURED — mirroring VoIP's not-configured semantics — so an un-provisioned mailbox reads as 'not set up' instead of a server error.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing