# tmux_scope:failure/0

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

```
-type failure() ::
          #{code := scope_cleanup_failed,
            primary := {ok, term()} | exception(),
            cleanup := {error, term()} | exception(),
            atom() => term()}.
```

Both outcomes when cleanup failed. primary contains the callback's ordinary return or exception; cleanup contains its separate error or exception. Resource-specific wrappers may add recovery handles to this map.
