Blue Reacher
Errors13 / 46

Errors

The error body, what each HTTP status means, the upper-case codes that appear in the message text, and which failures are safe to retry.

The error body

Every error returns JSON with success set to false and a human-readable message:

{
  "success": false,
  "message": "Missing scope(s): contacts.write. This integration was granted: contacts.read"
}

Rate-limit errors add an error field:

{
  "success": false,
  "message": "Daily rate limit exceeded: 200,000 requests per day (resets 00:00 UTC).",
  "error": "RateLimitExceeded"
}

Branch on the HTTP status first. Where a route can fail in more than one way with the same status, the message text names the case.

Status reference

StatusMeaningWhat to do
400Validation. A field is missing, malformed or not allowed on this route.Fix the request. The message names the field or the rule.
401Invalid or expired access token.Refresh the token with the refresh grant, then retry. See Authentication.
403Missing scope(s): ... The token was not granted the scope this route needs. The message lists what was granted.Re-install the app with the scope included. See Scopes.
404The record does not exist, or it belongs to another installer. The API answers the same way in both cases so ids are not leaked.Check the id and the workspace.
409Conflict with the current state. On a send, the contact has outbound Do Not Disturb on.Read the current state before you retry. For DND, do not send.
422The line refused the change. The message carries LINE_REFUSED.Read the message again. Apple's edit and unsend windows may have passed.
429Rate limited. error is RateLimitExceeded.Wait for Retry-After, then retry. See Rate limits.
500Unexpected server error.Retry with backoff. If it persists, contact support with the request details.
502The message could not be handed to the messaging provider.Retryable. Retry with backoff.
503Sending is not available for this account, or the line is offline (LINE_UNREACHABLE).Do not retry in a loop. Check the account or the line, then retry.
504The line did not answer in time (LINE_TIMEOUT).The change may still land. Read the message again before you retry.

Codes in the message text

Some routes put an upper-case code in message. Match on it rather than on the surrounding words.

CodeStatusWhereMeaning
NO_ADVANCED_MODE_LINE400Reactions, threaded replies, effects, edit, unsend, notify anyway, Check iMessageThe workspace has no line with Advanced Mode on.
RATE_LIMITED429Check iMessageEach line takes 10 checks a minute.
LINE_TIMEOUT504Check iMessage, edit, unsend, notify anywayThe line did not answer within the wait. The change may still land.
LINE_REFUSED422Edit, unsend, notify anywayMessages refused the change.
LINE_UNREACHABLE503Edit, unsend, notify anywayThe line is offline.

Retry rules

StatusRetry?
400, 403, 404, 409, 422No. The same request fails again. Fix the request, the scope or the state first.
401Yes, once, after refreshing the token.
429Yes, after Retry-After seconds.
500, 502Yes, with exponential backoff.
503Yes, after the cause is fixed. Not in a tight loop.
504Read the record first. A send or an edit may already have landed.

Treat an unknown 4xx as not retryable and an unknown 5xx as retryable.

Send failures

A send can be accepted with 200 and still end as failed. The API answers as soon as the message is queued. Poll GET /v1/messages/{id} and read status and error_message to see what happened after that.

On this page