Skip to main content

Exit codes

When bronto runs an exec plugin, the plugin’s own exit code passes through unchanged. The exit code comes from the error code’s prefix or suffix:
  • usage_* and config_* exit 2.
  • auth_* exits 3.
  • *_not_found exits 4.
  • rate_limited and timeout exit 5.
  • Everything else exits 1.
An unfinished query is a usage_invalid_query error, so it exits 2:

The error envelope

Errors always go to stderr. If stderr is a terminal, you get:
If stderr isn’t a terminal, you get one line of JSON instead:

Error codes

The common codes are below. Scripts should match on code. Idempotent requests that get a 429, 502, 503, or 504 are retried automatically before an error is reported, --max-retries times (default 2).