Skip to main content
Version: Latest

22. Meta Error Reference

Two distinct sections, deliberately kept separate so this document never overstates what Shumoul's own code actually does. Section 22.1 is grounded entirely in NotificationFailureClassifier's real source code — these are the only error signatures this system currently recognizes and reacts to programmatically. Section 22.2 is a general reference of additional Meta WhatsApp Cloud API platform error codes (drawn from Meta's own public API documentation) that this system may encounter but does not currently classify specially — they all fall through to the classifier's default Temporary bucket today.

22.1 Errors Actively Classified by This System

Source: Shumoul.Infrastructure/Services/Notifications/NotificationFailureClassifier.cs, ClassifyWhatsApp method. This classifier inspects the .NET exception message string raised by a failed send (a case-insensitive substring match), not a structured parse of Meta's JSON error object — so "matches" below means "the exception message contained this substring," not "Meta returned exactly this code and nothing else."

Matched signatureClassified asRetryable (per this classification)System Action
"429"RateLimitYes — queued for retry via the Notification Framework's generic retry pipelineBacks off and retries later; not surfaced as a permanent failure
"131000"InvalidRecipientNoRecorded as failed; no automatic retry — the recipient itself is the problem, not a transient condition
"131026"InvalidRecipientNoSame as above
"token", "190", "200", or "401"AuthenticationFailureNo (requires credential fix, not a retry)Recorded as failed; should raise an operational alert, since it implies the platform's or tenant's access token needs attention
"timeout" or "timed out"TimeoutYesQueued for retry
Exception type name contains IOException, SocketException, or HttpRequestExceptionNetworkFailureYesQueued for retry
Exception type name contains TaskCanceledException or OperationCanceledExceptionTimeoutYesQueued for retry
None of the aboveTemporary (default)YesQueued for retry — the safe default for anything unrecognized
Code / SignatureMeaning (Meta)User ActionRecommended UI Message
131000Generic "message failed to send" — often a downstream Meta-side issueNone — wait and retry manually if the classifier doesn't auto-retry"This message could not be delivered. Please try again in a few minutes."
131026Message undeliverable — recipient's number is not reachable on WhatsApp, or has not opted in / is not in an allowed test-number list (sandbox apps)Verify the recipient's number is correct and has WhatsApp installed"This phone number cannot receive WhatsApp messages right now."
190Access token expired or invalidNone (admin action required)"WhatsApp connection needs attention. Please contact support." (never expose token details to end users)
200Permission error — the token lacks the required permission/scope for this actionNone (admin action required)Same as above
401Unauthorized — invalid or missing credentialsNone (admin action required)Same as above
429Rate limit exceededNone — system will retry automatically"High message volume — this will be retried automatically."

22.2 Additional Meta Platform Error Codes (Reference Only — Not Yet Classified by This System)

These are documented, publicly known Meta WhatsApp Cloud API error codes that this system has not coded any special handling for — a message failing with one of these today falls into the classifier's default Temporary bucket and is retried like any unrecognized transient error, which may not always be the correct behavior (e.g. a permanently-invalid template will never succeed no matter how many times it is retried). Listed here so a future phase has a starting point for expanding ClassifyWhatsApp, not because this system currently does anything special with them.

CodeMeaningRetryableRecommended System Action (if implemented)
131047Re-engagement message — outside the 24-hour customer-service window; a template message is required instead of free textNoShould be classified as a permanent failure prompting a template-based resend, not a blind retry
131053Media upload error — the referenced media URL could not be fetched or is invalidNoShould surface a "media URL unreachable" error distinct from a generic send failure
132000Template parameter count mismatchNoShould be classified as a permanent configuration error, not retried
132001Template does not exist or is not approved for the specified languageNoSame — permanent, configuration-level
132005Template is paused (quality rating dropped)NoPermanent until template quality recovers on Meta's side
133010Account not registered / not onboarded correctly on the Cloud APINoPermanent — requires Meta Business Manager remediation
368Business account temporarily or permanently restricted by MetaNoPermanent — requires Meta-side account review
80007Cloud API rate limit hit (distinct numeric code from the generic HTTP 429)YesShould be treated the same as the "429" substring match already handled

Recommendation for a future phase (not undertaken here per this phase's documentation-only scope): expand ClassifyWhatsApp to parse the structured Meta error JSON (code/title/message/error_data) directly from the webhook status payload (see §21.12) rather than relying on substring-matching a .NET Exception.Message, which only covers synchronous send failures and never sees the richer error detail available in an asynchronous webhook-delivered failure status.