# error.Error.OptionScopeMismatch

- **Module:** error.Error
- **Package:** libtmux
- **Language:** Rust
- **Kind:** constant
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/error.rs#L500
- **Page:** https://libtmux.org/en/rs/latest/reference/error-error-optionscopemismatch/

The handle's scope is not one tmux keeps this option in.

Raised instead of sending the write, because tmux would not refuse it.
tmux resolves an option by name rather than by the flags it was sent
with, so `mouse` through a pane handle becomes the whole session's
`mouse` and reports success. Reading it back through the same handle
resolves the same way and agrees, so nothing downstream notices.

[`crate::OptionSchema::accepts`] answers ahead of the call, for a
caller choosing a handle rather than reacting to a refusal.
