# `ExGram.Error`
[🔗](https://github.com/rockneurotiko/ex_gram/blob/0.65.0/lib/ex_gram/error.ex#L1)

Error struct for representing errors in ExGram.

Can represent both errors returned by Telegram (API errors with codes and descriptions)
and errors that occur within the library itself.

Implements the `Exception` behaviour.

# `t`

```elixir
@type t() :: %ExGram.Error{
  __exception__: true,
  code: number() | atom(),
  message: String.t() | any(),
  metadata: any()
}
```

---

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