Output and errors
filemaker reports at three levels: one NDJSON result for each operation, one closing summary for the batch, and one process exit code. Automation should read all three. The closing summary determines whether earlier successful operations were committed or rolled back.
Operation results
Each input line produces one JSON object on standard output. The op value identifies the request, and status is ok, dry-run, or error.
{"op":"create:table","status":"ok","result":{"name":"Invoices","id":130}}
{"op":"create:table","status":"dry-run","result":{"name":"Invoices","id":130}}
{"op":"read:table","status":"error","error":{"code":"not_found","message":"table 'Invoices' not found"}}
The shape of result depends on the operation. Use filemaker help <catalog> <verb> to inspect the installed operation contract.
An error object always has a machine-readable code and a human-readable message. It may also include:
-
suggestionswith specific recovery steps -
dbErrorwith the numeric error returned by the FileMaker engine -
Additional fields such as the user or object holding a lock
When dbError is present, use it with code instead of matching the message text. Different FileMaker errors can have similar messages but require different action.
Batch summary
After processing the input, filemaker writes one summary object to standard error:
{"type":"summary","total":2,"ok":1,"errors":1,"dryRun":false,"rolledBack":true}
| Field | Meaning |
|---|---|
total
|
Number of operations processed |
ok
|
Operations that completed without an error |
errors
|
Operations that reported an error |
dryRun
|
Whether --dry-run was used |
rolledBack
|
Whether the transaction was aborted and its changes were discarded |
Always inspect the summary before treating an operation result as committed. An operation can report "status":"ok" and still be rolled back because a later operation failed.
Warning No summary means the outcome is unknown If the process ends without a closing summary, do not assume that the batch committed or rolled back. Read the FileMaker file again in a new filemaker process before retrying any operation.
Fatal and usage errors
An error that prevents the batch from starting produces a JSON object with "type":"fatal" on standard error:
{"type":"fatal","error":{"code":"open_failed","message":"failed to open file","dbError":802}}
Invalid or missing command-line options can also produce a "type":"usage" object containing the accepted invocation. Neither form produces operation results because no batch ran.
Process exit codes
The process exit code gives scripts a quick success or failure signal. Parse the JSON output for the specific outcome.
| Exit code | Meaning |
|---|---|
0
|
The command completed without errors |
1
|
One or more input or operation errors were reported |
2
|
The command could not start the batch, such as invalid invocation or a file-open failure |
4
|
The run reached its configured timeout |
A nonzero exit code does not replace the operation results or summary. For example, a batch run with --abort-on-error=false can exit with an error while still committing the operations that succeeded.
Output destinations
Operation results go to standard output by default. Pass --out=<path> to write those result lines to a file instead. Summaries, fatal errors, usage information, and credential events remain on standard error so a script can keep result data separate from run status.