# `MatchError`
[🔗](https://github.com/elixir-lang/elixir/blob/v1.20.0-rc.3/lib/elixir/lib/exception.ex#L1505)

An exception raised when a pattern match (`=/2`) fails.

For example:

    iex> [_ | _] = []
    ** (MatchError) no match of right hand side value:
    ...

The following fields of this exception are public and can be accessed freely:

  * `:term` (`t:term/0`) - the term that did not match the pattern

---

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