Skip to main content
Every nullspace CLI invocation exits with one of the stable codes below. Agents and scripts can branch on the exit code without parsing output; in --json mode the failure body additionally carries a machine-readable code (see the error envelope).

Exit Codes

How JSON Error Codes Map To Exit Codes

When a command fails, the machine-readable error code selects the exit code. Exact mappings: Codes not listed above fall back to pattern rules, in order:
  • *_not_found → 3 (not found)
  • *_permission_denied → 5 (permission denied)
  • codes containing quota or rate_limit → 6 (quota or rate limited)
  • *_conflict → 7 (conflict)
  • anything else → 1 (generic failure)
Usage errors raised by the CLI itself (bad flags, missing arguments) exit with 2.
  • Error Codes - the CLI JSON error envelope and edge/preview error anchors.
  • API Error Catalog - machine-readable error codes from the ErrorResponse schema.