> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/cli/reference/exit-codes-and-errors.md).

# Exit codes and errors

Devolutions CLI exit codes, how errors are reported in text and JSON output, and the most common error codes with what to do.

Every `devo` command returns an exit code, so a script can tell success from failure. When a command fails, it also reports an error code, a short identifier such as `invalidSecretReference`, and a message.

## Exit codes

<table><thead><tr><th width="120">CODE</th><th>MEANING</th></tr></thead><tbody><tr><td><code>0</code></td><td>The command succeeded.</td></tr><tr><td><code>1</code></td><td>The command failed, for example because the workspace refused the operation or doesn't support it.</td></tr><tr><td><code>2</code></td><td>The command line is invalid, and nothing was done: unknown command or option, missing or invalid value, options that can't be combined, or a change without <code>--yes</code>.</td></tr><tr><td><code>3</code></td><td>The background process couldn't be reached or didn't answer in time, or it reported an error. A local profile that can't run a vault or entry command, for example a vault change (<code>sqliteVaultLifecycleUnavailable</code>), also exits with <code>3</code>. See <a href="/cli/help/troubleshooting/daemon-wont-start.md">The background process won't start</a>.</td></tr><tr><td><code>4</code></td><td>An item you asked for wasn't found, such as a workspace, vault, entry, user, or group, or a field with <code>devo secret read</code> and <code>devo secret get</code>. Some commands report a missing item with <code>1</code> instead: for example, <code>devo secret get</code> on a local profile returns <code>sqliteSecretNotFound</code> with <code>1</code>. The <a href="/cli/reference/error-codes.md">Error codes</a> page gives the exit code of each error.</td></tr><tr><td><code>124</code></td><td><code>devo secret run</code> only: the command exceeded <code>--timeout-seconds</code> and was stopped.</td></tr><tr><td><code>130</code></td><td>The command was interrupted, for example with <kbd>Ctrl</kbd>+<kbd>C</kbd>. With <code>devo secret run</code>, the command it started was cancelled.</td></tr></tbody></table>

### `devo secret run`

When the command it starts runs to the end, `devo secret run` exits with **that command's exit code**, so your scripts and pipelines see the same result as if they had run the command directly. Exit codes `124` and `130` apply only when the command is stopped. If `devo secret run` can't write the file given with `--receipt-file`, it exits with `1`.

Before the command starts, an invalid `--env-file` or a reference that needs a missing environment variable exits with `2`; another failure to read a secret exits with `1`.

## How errors are reported

* **Text output** (the default): the error is written as `<code>: <message>`, usually to the error output. Errors of the commands that work only with Devolutions Cloud or Devolutions Server, such as most `devo admin` commands, go to the standard output. For an invalid command line, the help of the command follows.
* **JSON or YAML output**: the error goes to the standard output, in the same envelope as a result, with `status` set to `error` and an `errors` list. Each error has a `code` and a `message`. An invalid command line returns the code `usageError`, and `usageSuggestion` when Devolutions CLI has a correction to suggest. See [Read results as JSON](/cli/for-devops-and-administrators/automate/json-output.md).
* **`devo secret run`**: whatever the output format, the errors that happen while it reads the secrets or runs the command (timeout, cancellation, standard input) are written as plain `<code>: <message>` text to the error output.

## Common error codes

The table below lists the error codes you'll meet most often. For every error code, see [Error codes](/cli/reference/error-codes.md).

<table><thead><tr><th width="270">ERROR CODE</th><th>WHAT IT MEANS</th><th>WHAT TO DO</th></tr></thead><tbody><tr><td><code>usageError</code></td><td>Unknown command or option, or a missing argument.</td><td>Check the spelling with <code>devo &#x3C;command> --help</code>. See <a href="/cli/reference/commands.md">Commands</a>.</td></tr><tr><td><code>conflictingOptions</code></td><td>Two options that can't be used together, such as <code>--json</code> and <code>--yaml</code>, or <code>--quiet</code> and <code>--verbose</code>.</td><td>Keep one of them. See <a href="/cli/reference/global-options.md#options-that-cant-be-combined">Global options</a>.</td></tr><tr><td><code>missingParameter</code>, <code>invalidParameterValue</code></td><td>A required value is missing, or a value isn't allowed.</td><td>Read the message: it names the option. Check the allowed values with <code>--help</code>.</td></tr><tr><td><code>invalidSource</code></td><td>The <code>--source</code> value isn't valid.</td><td>Use <code>sqlite</code>, <code>cloud[:&#x3C;context>]</code>, or <code>server[:&#x3C;context>]</code>.</td></tr><tr><td><code>confirmationRequired</code>, <code>mutationConfirmationRequired</code></td><td>The command changes or deletes something and wasn't confirmed.</td><td>Add <code>--yes</code> once you're sure.</td></tr><tr><td><code>rawSensitiveValueRejected</code></td><td>A secret was passed in a way that could expose it, such as a password as a plain field value.</td><td>Use <code>devo secret set</code> with <code>--value-env</code> or <code>--value-file</code>. See <a href="/cli/guides/secrets/update-a-secret.md">Update a secret from a script</a>.</td></tr><tr><td><code>invalidSecretReference</code></td><td>The reference isn't written correctly.</td><td>See the messages in <a href="/cli/reference/secret-references.md#rules-and-errors">Secret reference syntax</a>.</td></tr><tr><td><code>unsupportedSecretAttribute</code></td><td>The <code>?attribute=</code> value isn't known.</td><td>Use <code>value</code>, <code>type</code>, <code>id</code>, <code>title</code>, or <code>purpose</code>. <code>otp</code> is accepted in a reference, but no workspace type returns a value for it. See <a href="/cli/reference/secret-references.md#attributes">Attributes</a>.</td></tr><tr><td><code>missingSecretReferenceVariable</code></td><td>A reference in a template uses an environment variable that isn't set.</td><td>Set the variable, or give it a default with <code>${NAME:-default}</code>. See <a href="/cli/reference/secret-references.md#references-inside-a-text">References inside a text</a>.</td></tr><tr><td><code>secretLaunchArgumentReference</code></td><td>A <code>devo://</code> reference was written as an argument of the command to run.</td><td>Pass it with <code>--env-ref</code>, <code>--stdin-reference</code>, or <code>--manifest</code>. See <a href="/cli/guides/secrets/run-with-secrets.md">Run a command with its secrets</a>.</td></tr><tr><td><code>secretLaunchTimedOut</code></td><td>The command started by <code>devo secret run</code> exceeded <code>--timeout-seconds</code>.</td><td>Raise the timeout, or find out why the command takes so long.</td></tr><tr><td><code>secretLaunchCancelled</code>, <code>interrupted</code></td><td>The command was interrupted.</td><td>Run it again.</td></tr><tr><td><code>operationNotSupportedBySource</code></td><td>The selected workspace type can't run this command.</td><td>Select another workspace with <code>--context</code>. See <a href="/cli/help/troubleshooting/not-supported.md">A command says the workspace doesn't support it</a>.</td></tr><tr><td><code>cloudContextNotFound</code></td><td>No Devolutions Cloud context with that name, or no current one.</td><td>Check <code>devo context list</code>, or sign in with <code>devo login</code>. See <a href="/cli/help/troubleshooting/sign-in-fails.md">Sign-in fails or the session expired</a>.</td></tr><tr><td><code>daemonUnavailable</code>, <code>daemonTimeout</code>, <code>daemonIoError</code></td><td>The background process couldn't be reached, didn't answer in time, or the connection broke.</td><td>Run <code>devo daemon status</code>, then <code>devo daemon restart</code>. See <a href="/cli/help/troubleshooting/daemon-wont-start.md">The background process won't start</a>.</td></tr><tr><td><code>unexpectedError</code></td><td>An error Devolutions CLI didn't expect.</td><td>Run <code>devo doctor</code> and contact support. See <a href="/cli/help/troubleshooting/collect-diagnostics.md">Collect diagnostics for support</a>.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/cli/reference/exit-codes-and-errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
