# Xygeni CLI Error Codes

## Xygeni CLI Error Codes

The scanner command-line interface (CLI) `xygeni` returns exit codes in the following ranges:

* **0**: `OK`, zero exit code when it completes successfully.
* **1 …​ 127**: `ERROR`, used for a non-recoverable error in the scan.
  * 3, 4: REPORT ERROR
  * 13: TIMEOUT ERROR
  * 114: TOKEN REQUIRED (by codetamper)
  * 125: UPLOAD ERROR
  * 127: LICENSE ERROR
* **128 …​ 254**: `WARNING`, at least one security issue was detected.
  * 128: issues detected in deps or secrets
  * 130: issues detected in misconf
  * 132: issues detected in suspectdeps or compliance
  * 134: issues detected in iac, sast or malware
  * 136: issues detected in codetamper
* **255**: reserved for an unknown ERROR.

There are different causes of ERROR conditions:

* Invalid arguments, like using an unknown command or not having a required argument in the command line.
* Fatal error during setting up the scanner. For example, when configuration cannot be loaded.
* Post-processing error, typically with `--diff` option but no valid baseline.
* Error while generating output, for example when writing report files or uploading results to Xygeni service.
* A generic fatal error, typically due to a bug that leads to an uncaught error.

{% hint style="info" %}
The `--never-fail` forces the scanner to end with a zero error code, even with fatal error. This is useful to avoid breaking the build when the scan fails.
{% endhint %}

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/xygeni-cli-error-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
