# `QuackDB.Error`
[🔗](https://github.com/elixir-vibe/quackdb/blob/main/lib/quack_db/error.ex#L1)

Structured error returned by the QuackDB client.

# `code`

```elixir
@type code() :: atom()
```

# `source`

```elixir
@type source() :: :client | :server | :transport | :protocol
```

# `t`

```elixir
@type t() :: %QuackDB.Error{
  __exception__: true,
  code: code(),
  connection_id: String.t() | nil,
  message: String.t(),
  metadata: map(),
  query: iodata() | nil,
  retriable?: boolean(),
  source: source()
}
```

# `new`

```elixir
@spec new(code(), String.t(), Keyword.t()) :: t()
```

---

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