Error Codes

Complete reference of 33 error codes across 8 categories returned by the CPaaS Orchestrator Service.

Error response formatjson
{
  "error": {
    "code": "ERR_CPAAS_RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded for channel WHATSAPP",
    "http": 429
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Bad RequestHTTP 400

CodeHTTPDescriptionResolution
ERR_CPAAS_INVALID_PHONE_NUMBER400Phone number format is invalid (expected E.164)Use E.164 format: +1234567890
ERR_CPAAS_INVALID_EMAIL400Email address format is invalidProvide a valid email address
ERR_CPAAS_INVALID_CHANNEL400Unsupported messaging channelUse: WHATSAPP, SMS, EMAIL, VOICE, or PUSH
ERR_CPAAS_EMPTY_MESSAGE_BODY400Message body cannot be emptyProvide a non-empty message_body
ERR_CPAAS_TEMPLATE_NOT_FOUND400Referenced template does not existVerify template_id or template name
ERR_CPAAS_TEMPLATE_VARIABLES_MISSING400Required template variables not providedInclude all required template variables
ERR_CPAAS_INVALID_WEBHOOK_URL400Webhook URL is not a valid HTTPS URLProvide a valid HTTPS URL
ERR_CPAAS_INVALID_PROVIDER_CONFIG400Provider configuration is invalidCheck required config fields for the provider
ERR_CPAAS_BULK_LIMIT_EXCEEDED400Bulk message count exceeds max (1000)Split into batches of 1000 or fewer
ERR_CPAAS_VALIDATION_FAILED400Request body validation failedCheck request body against API docs

UnauthorizedHTTP 401

CodeHTTPDescriptionResolution
ERR_CPAAS_UNAUTHORIZED401Missing or invalid authenticationProvide a valid Bearer JWT token
ERR_CPAAS_TOKEN_EXPIRED401JWT token has expiredRefresh the token via auth-svc /refresh endpoint
ERR_CPAAS_INVALID_API_KEY401Internal API key is invalidUse the correct x-internal-api-key header

ForbiddenHTTP 403

CodeHTTPDescriptionResolution
ERR_CPAAS_FORBIDDEN403Insufficient permissions for this actionRequest the required role from admin
ERR_CPAAS_TIER_INSUFFICIENT403Subscription tier too low for this featureUpgrade subscription tier
ERR_CPAAS_CHANNEL_DISABLED403Channel not enabled for this tenantEnable the channel in tenant settings

Not FoundHTTP 404

CodeHTTPDescriptionResolution
ERR_CPAAS_MESSAGE_NOT_FOUND404Delivery log not found for given IDVerify the message ID exists
ERR_CPAAS_PROVIDER_NOT_FOUND404Provider configuration not foundVerify the provider ID exists for this tenant
ERR_CPAAS_WEBHOOK_NOT_FOUND404Webhook configuration not foundVerify the webhook ID exists
ERR_CPAAS_PREFERENCE_NOT_FOUND404User preference not found for emailCreate preference first via PUT /preferences

ConflictHTTP 409

CodeHTTPDescriptionResolution
ERR_CPAAS_DUPLICATE_IDEMPOTENCY_KEY409Request with this Idempotency-Key already processedUse a new Idempotency-Key or retrieve the existing result
ERR_CPAAS_PROVIDER_ALREADY_EXISTS409A provider with this name/type already existsUpdate the existing provider instead
ERR_CPAAS_TEMPLATE_NAME_TAKEN409A template with this name already existsUse a different template name

UnprocessableHTTP 422

CodeHTTPDescriptionResolution
ERR_CPAAS_OPT_OUT_BLOCKED422Recipient has opted out of this channelRespect the opt-out or use a different channel
ERR_CPAAS_TEMPLATE_NOT_APPROVED422Template must be approved before useApprove the template first via POST /templates/:id/approve

Rate LimitHTTP 429

CodeHTTPDescriptionResolution
ERR_CPAAS_RATE_LIMIT_EXCEEDED429Rate limit exceeded for this channelWait for the rate limit window to reset
ERR_CPAAS_QUOTA_EXCEEDED429Monthly/daily quota exhaustedUpgrade subscription tier or wait for quota reset
ERR_CPAAS_EMERGENCY_LIMIT429Daily emergency broadcast limit reached (5/day)Wait until tomorrow or contact support

Server / ProviderHTTP 500-503

CodeHTTPDescriptionResolution
ERR_CPAAS_PROVIDER_UNAVAILABLE503No healthy provider available for this channelRetry; providers may be recovering
ERR_CPAAS_PROVIDER_SEND_FAILED502Provider returned an error when sendingCheck provider status; message will be auto-retried
ERR_CPAAS_INTERNAL_ERROR500Unexpected internal server errorRetry; if persistent, contact support with request_id
ERR_CPAAS_BOOTSTRAP_FAILED503Service is still initializingRetry in a few seconds (Lambda cold start)
ERR_CPAAS_DATABASE_ERROR500Database operation failedRetry; Aurora Serverless may be scaling up