# `Rupa.EncodeError`
[🔗](https://github.com/zero-one-group/rupa/blob/v0.1.0/lib/rupa/encode_error.ex#L1)

Raised by `Rupa.encode!/3` when a value does not match the schema it is being encoded against.

Its own exception rather than a shared one, because the two failures mean different things:
a decode error is the outside world being wrong, and an encode error is your own code being
wrong about a value it built.

# `t`

```elixir
@type t() :: %Rupa.EncodeError{__exception__: term(), errors: [Rupa.Error.t()]}
```

---

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