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 codeMeans
0Success. See Exit 0.
1Something failed once the command was running: a request, a job, a file. See Exit 1.
2A usage or configuration error. See Exit 2.

Exit 0

  • Success.
  • nace job ID without --wait exits 0 whatever the job's status, and nace browser get RUN_ID whatever the run's: check status.
  • 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 run waited for ended other than succeeded, 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 --ingest or nace job read it.
  • nace upload --ingest of a folder whose every file was skipped.
  • -o md on a job without Markdown.
  • A tool's or nace job's --save file 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 file come after a request: --link on a file that streams, and a file it can't write (an unwritable --save path, or, without --save, the current directory). Stdout stays empty.
  • nace with no command prints its help and exits 2.

On this page