# `EctoHrana.Error`
[🔗](https://github.com/l-vincent-l/ecto_hrana/blob/main/lib/ecto_hrana/error.ex#L1)

An error of the server or of the transport.

  * `:message` - for a server error, SQLite's message, e.g.
    `"UNIQUE constraint failed: users.name"` (the server's
    `"SQLite error: "` prefix is removed, so that `ecto_sqlite3` recognises
    constraint errors);
  * `:code` - the SQLite error code, e.g. `"SQLITE_CONSTRAINT_UNIQUE"`, or
    `nil` for a transport error (network, HTTP status);
  * `:statement` - the SQL of the statement that failed.

# `t`

```elixir
@type t() :: %EctoHrana.Error{
  __exception__: term(),
  code: String.t() | nil,
  message: String.t(),
  statement: String.t() | nil
}
```

---

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