# tmux_operation:failure/0

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_operation.erl#L56
- **Page:** https://libtmux.org/en/erlang/latest/reference/t-tmux_operation-failure-0/

```
-type failure() ::
          #{code := atom(),
            outcome => outcome(),
            cleanup => cleanup(),
            stdout => binary(),
            stderr => binary(),
            stdin_delivered => non_neg_integer(),
            exit_status => integer(),
            submitted => boolean(),
            atom() => term()}.
```

A tagged error detail with a stable code and optional certainty/output data. Validation, admission and wait errors may contain only code. Command failures retain available stdout/stderr, stdin_delivered and exit_status. Other keys provide code-specific context. Never infer missing certainty fields.

Common codes are busy, invalid_operation_options, command_error, deadline,
cancelled, stale_server, cleanup_incomplete, await_timeout and
operation_expired. command_error means a nonzero client exit; it does not roll
back a mutation. await_timeout abandons only this wait. operation_expired
cannot reconstruct a previous result or establish its remote outcome.

## Guides

Pages that discuss `failure/0`.

- [Owned operations](/en/erlang/latest/guides/operations/)
