Error Handling - Messaging
Error Handling
Validation errors return HTTP 400. Application-level errors follow this structure:
{
"code": "ERROR_CODE",
"message": "Description of the error"
}
Bulk Message Error Codes
| Error | Meaning |
|---|---|
noActiveGroups | All specified groups are inactive |
noActiveGroupUsers | No active users found in any specified group |
someGroupsHaveNoActiveUsers | Some groups have no active users |
Retry strategy: For transient errors (HTTP 5xx, timeouts), retry with exponential backoff: 1s, 2s, 4s, with jitter, up to 3 retries. For client errors (HTTP 400, noActiveGroups, noActiveGroupUsers, validation errors), fix the request before retrying — these will not resolve on their own. For async operations (message delivery tracking), poll with increasing intervals (5s, 10s, 30s) rather than tight loops.