KamoCRM

Return 422 (not 500) when member has no mailbox

FixEmailService
Shipped
1 ஜூலை, 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing