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

An exception raised when a map is expected, but something else was given.

For example:

    iex> value = "hello"
    iex> %{value | key: "value"}
    ** (BadMapError) expected a map, got:
    ...

---

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