# internal_error

> `disko` hit an unexpected error that has no specific code.

| | |
| --- | --- |
| Kind | `disko` command error |
| `disko` exit code | 1 (problems) |

Any command reports `internal_error` when it fails in a way the CLI does not
anticipate, for example a file system error while writing `--out`. It is a
bug in `disko`. The command exits with code 1 and, like every exit code 1,
reports it as a problem: `problems` holds one entry with the code
`internal_error`, and the message starts with `unexpected error:` followed by
the underlying cause.

```json
{
  "ok": false,
  "command": "publish",
  "error": "internal_error",
  "message": "unexpected error: …; this is a bug in disko, please report it with the command and this message",
  "docs": "https://docs.disko.ooo/errors/internal_error",
  "problems": [
    {
      "code": "internal_error",
      "message": "unexpected error: …",
      "docs": "https://docs.disko.ooo/errors/internal_error"
    }
  ]
}
```

With `disko dev --json`, the same fields arrive in the final `stopped` event.

## Fix

- Read the cause in the message; it often names a file or permission problem
  you can fix directly.
- Run the command again. For a publish, a failed attempt never uses up the
  version.
- If the error persists, report it with the command you ran and the output
  of the same command with `--json`.

## See also

- [Error codes](/errors)
- [CLI reference](/reference/cli)
