# Exit Codes

Source: https://zshot-cli.com/reference/exit_codes/
Markdown: https://zshot-cli.com/reference/exit_codes/index.md
Section: [Reference](https://zshot-cli.com/reference/)

Every run exits with one of the codes below. Nonzero exits print a description
of the failure to stderr.

| Code | Meaning |
| --- | --- |
| 0 | Success. Informational flags such as `--help` and `--version` also exit 0. |
| 1 | Unknown or internal error not covered by a more specific code. |
| 2 | The render exceeded its [process timeout](../timeouts), or the command line failed to parse: an unknown flag or an invalid value. |
| 3 | Arguments rejected by ZShot's own validation, including flags that require a higher license tier. |
| 4 | Interrupted by SIGINT or SIGTERM. |
| 5 | Environment setup failed: CEF startup, display, proxy configuration, a refused `--chromium-preference`, loading a blocklist or adblock list, or a `--web-bot-auth` key URL that cannot be fetched or holds no usable key. |
| 6 | The page rendered but encoding the output failed. |
| 7 | The page failed to load. |
| 8 | Access disallowed by the site's robots.txt. |
| 9 | LLM navigation with `--navigate` did not achieve its goal. |
| 11 | The primary output was written, but a HAR, WARC, or network-log output failed to write. |
| 12 | The render succeeded but streaming the payload to stdout with `-f -` failed. |
| 13 | A captured resource body could not be spilled to disk. The request is cancelled rather than producing a partial archive. |
| 14 | A [credential helper](../flags/navigator/navigator-credential-helper) failed: not found or changed since startup, non-zero exit, timeout, or a bad HTTP response. The message names the credential and the reason. |
| 15 | A URL-backed [navigator file](../flags/navigator/navigator-file) could not be fetched: a bad HTTP status, timeout, size limit, blocked address, or empty body. The message names the file and the reason. |
| 16 | The page is a PDF, which ZShot renders only as `download`, `warc`, `wacz` or `har`. A navigator session that reaches a PDF ends with it. |

In [`--server` mode](/reference/server/api) these codes apply to server startup; failures of
individual render requests are reported in the HTTP response instead.

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - **Exit Codes**
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

