# `SnakeBridge.SessionMismatchError`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.16.0/lib/snakebridge/session_mismatch_error.ex#L1)

Raised when a ref is used with a different session than it was created in.

SnakeBridge refs are session-scoped: a ref created in session A cannot be
used in session B. This error indicates a ref is being used across session
boundaries.

## Fields

- `:ref_id` - The ref ID that caused the mismatch
- `:expected_session` - The session ID the ref belongs to
- `:actual_session` - The session ID the ref was used in
- `:message` - Human-readable error message

# `t`

```elixir
@type t() :: %SnakeBridge.SessionMismatchError{
  __exception__: true,
  actual_session: String.t() | nil,
  expected_session: String.t() | nil,
  message: String.t(),
  ref_id: String.t() | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
