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

An exception raised when a protocol is not implemented for a given value.

For example:

    iex> Enum.at("A string!", 0)
    ** (Protocol.UndefinedError) protocol Enumerable not implemented for BitString
    ...

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

  * `:protocol` (`t:module/0`) - the protocol that is not implemented
  * `:value` (`t:term/0`) - the value that does not implement the protocol

---

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