Output and reference
Output and exit codes
Stdout holds the result; stderr holds status lines, hints and errors. So nace decide ... --json > answer.json and nace parse doc.pdf > doc.md capture only the result.
| Exit code | Means |
|---|---|
0 | Success. See Exit 0. |
1 | Something failed once the command was running: a request, a job, a file. See Exit 1. |
2 | A usage or configuration error. See Exit 2. |
Exit 0
- Success.
nace job IDwithout--waitexits0whatever the job's status, andnace browser get RUN_IDwhatever the run's: checkstatus.- The one exception is an ingestion that failed a file, which exits
1.
Exit 1
- A request failed: an API error, a connection error or a timeout.
- A job you waited for failed, was cancelled, or outlasted
--wait-timeout. Its id goes to stdout. - A browser run
nace browser runwaited for ended other thansucceeded, or outlasted--wait-timeout. Its id goes to stdout. - An upload or a download failed after its requests went out, including any file of a folder.
- An ingestion reports a file it failed to ingest, whether
nace ingest,nace upload --ingestornace jobread it. nace upload --ingestof a folder whose every file was skipped.-o mdon a job without Markdown.- A tool's or
nace job's--savefile couldn't be written. The result goes to stdout instead.
Exit 2
- A usage or configuration error: an unknown flag, a bad value, a missing file, invalid JSON, no API key, or an argument the SDK refuses. Most are caught before any request.
- Two from
nace filecome after a request:--linkon a file that streams, and a file it can't write (an unwritable--savepath, or, without--save, the current directory). Stdout stays empty. nacewith no command prints its help and exits2.