Guides
API principles

Errors

The Graph error envelope with is_transient, the HTTP statuses, the most common codes and when to retry a call.

Every error comes in the Graph envelope:

json
{
  "error": {
    "message": "(#100) Invalid parameter",
    "type": "OAuthException",
    "code": 100,
    "error_subcode": 1885272,
    "is_transient": false,
    "error_user_title": "Your Budget Is Too Low",
    "error_user_msg": "O orçamento diário mínimo deste conjunto é R$ 5,00.",
    "error_data": { "blame_field_specs": [["daily_budget"]] },
    "fbtrace_id": "uu_3OO2gIWY"
  }
}
FieldMeaning
messageTechnical description, in English
typeOAuthException for most codes (validations included), GraphMethodException for a nonexistent object, FacebookApiException for transient errors
code / error_subcodeWhat happened; the subcode adds detail
is_transientAlways present. true when repeating the same call may succeed
error_user_title, error_user_msgText to show the person. In Mimicr, it comes in Portuguese for pt_BR users on several validations
error_data.blame_field_specsThe parameters that caused the validation error
fbtrace_idRequest identifier

HTTP status

HTTPWhen
400Almost all: validation (100), token (190, also with WWW-Authenticate), permission (200), limits (4, 17, 613, 80004), version (2635)
403Code 10 (permission denied)
500Transient errors, codes 1 and 2 (is_transient: true). The 1 for a wrong secret on the code exchange answers 400
503"Service unavailable" chaos
501Route outside Mimicr's core (type: "MimicrNotSimulated")

In Mimicr, code 190 answers HTTP 400, like the Marketing API; the WhatsApp simulator uses 401 for the same code.

Common codes

CodeSubcodeMeaning
1Unknown error (for example, a wrong client_secret on the code exchange)
2Service temporarily unavailable; is_transient: true
4App call limit
172446079Ad account call limit
100Invalid or missing parameter
10033Nonexistent object or no permission ("Unsupported get request")
104No token
190458, 460, 463Invalid token: app removed, password changed, expired
200No permission (or disabled account)
210A Page access token is required
6131487632, 4841018Budget change or edit limit
2200The webhook callback failed verification
2500Unknown path ("Unknown path components")
2635Deprecated API version
80004Hourly limit for the ads_management use case
80000Hourly limit for the ads_insights use case

Each operation's codes are in the reference, under the 400 response. Campaign, ad set and creative validation codes are in Create a campaign; Insights codes in Insights; Conversions API codes in Conversions API.

Unknown field and path

json
{ "error": { "message": "(#100) Tried accessing nonexisting field (naem) on node type (User)", "type": "OAuthException", "code": 100, "is_transient": false, "fbtrace_id": "FfyzOric3Vg" } }

An id that doesn't exist, or that the token can't see, answers 100/33 with type: "GraphMethodException". An unknown edge answers 2500.

Outside the core

Routes that Meta has and Mimicr doesn't simulate answer 501:

json
{ "error": { "message": "Not simulated by Mimicr: GET /act_100539998049706/customaudiences is outside the integration core.", "type": "MimicrNotSimulated", "code": 501, "is_transient": false, "fbtrace_id": "…" } }

Among them: custom audiences, reach estimates, targeting search, image library, previews, copies, rules, Batch API (POST /), chunked video upload, app and offline conversions, and Business Manager administration.

When to retry

  • Retry with backoff (1 s, 3 s, …) when is_transient is true or the code is 1 or 2.
  • Don't retry rate limits (4, 17, 613, 80000–80014) right away: wait out the window (see Rate limits).
  • Don't blindly retry creates: the Graph API has no idempotency key and a 500 after processing may have created the object. The apiErrorWhen: "after" chaos simulates exactly that. Read before creating again.
  • Status changes are idempotent and can be retried.