# errors.TmuxCommandError

- **Module:** errors
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L436
- **Page:** https://libtmux.org/en/ts/latest/reference/errors-tmuxcommanderror/

A tmux command that exited non-zero.

The parts are fields rather than a formatted sentence so callers can branch
on them. Matching a message substring is the failure mode this replaces: it
breaks silently when tmux rewords, and it cannot distinguish "already in the
requested state" from a genuine error.

## Members

- `code` (attribute)
- `args` (attribute)
- `exitCode` (attribute)
- `stderr` (attribute)
- `stdout` (attribute): Whatever the command printed before it failed.
- `target` (attribute)
- `constructor` (method)
- `stderrIncludes` (method): Whether tmux's own message contains a phrase, without message parsing at call sites.
