Skip to main content

Error handling

The Data API reports problems on two layers at once: the HTTP status code and a FileMaker error code inside the response body. Read both. The HTTP status tells you the transport-level category; the body code tells you what FileMaker actually objected to.

{
"response": {},
"messages": [
{ "code": "952", "message": "Invalid FileMaker Data API token (*)" }
]
}

Note that code is a string. Write your comparisons against "952", not 952.

Codes you actually encounter

FileMaker codeTypical HTTP statusMeaningWhat to do
0200SuccessNothing. This is the happy path.
100404File is missingCheck the {database} path segment; the name is the hosted file name without .fmp12.
101404Record is missingThe recordId does not exist. Treat as a stale reference, not a retry case.
102400 or 500Field is missingA field name in fieldData or a query does not exist on the layout. Field names are layout-scoped: the field must be placed on the layout you are calling.
105404Layout is missingCheck the {layout} path segment for typos and case.
212401Invalid account or passwordRe-check credentials, then confirm the account is active and its privilege set has the fmrest extended privilege.
306400Record modification ID does not matchSomeone changed the record after you read it. Re-read, reconcile, resubmit. See optimistic locking.
401404No records match the requestAn empty find result. Usually not an error at all. See handling empty finds.
500400Date value does not meet validationField-level validation rejected the write. The message names the constraint type, not the field; check your payload against the schema.
504400Value in field is not uniqueA unique-validation field rejected a duplicate. Surface this to the user rather than retrying.
952401Invalid Data API tokenThe token expired (15 minutes idle) or was already invalidated. Log in again and retry once.
953400Exceeded maximum data allowedThe response would be too large. Page with _limit and _offset instead of fetching everything.

The full error code list is in the Claris help center.

A sane retry policy

Most FileMaker errors are not retryable, because they are statements about your request, not about transient conditions. A reasonable default policy:

  • 952 (invalid token): log in again, retry the original request once, then fail.
  • HTTP 5xx with no parseable body: retry with backoff, two or three attempts. This is the server or the network, not FileMaker logic.
  • Everything else: do not retry. Log the FileMaker code and message, fix the request or surface the condition.

Log what your future self needs

When you log a Data API failure, capture the HTTP status, the FileMaker code, the message, the method and path (without the token), and the recordId or query involved. The pair of status plus code is the diagnosis; either one alone is a guess.