# `AshClickhouse.Error`
[🔗](https://github.com/ohhi-vn/ash_clickhouse/blob/main/lib/ash_clickhouse/error.ex#L1)

Error types for the AshClickhouse data layer.

Errors raised or returned by the data layer are wrapped in one of these
structs so that Ash can present consistent, structured error messages.

# `client_error?`

```elixir
@spec client_error?(term()) :: boolean()
```

True when the given value is one of the `clickhouse` client's error structs.

# `reraise_or_wrap`

```elixir
@spec reraise_or_wrap(term(), list()) :: no_return()
```

Reraises a rescued exception, converting client errors to `ClickhouseError`.

Client exceptions are translated to `AshClickhouse.Error.ClickhouseError` so
callers get a consistent, structured error. Any *other* exception (a genuine
bug in the library or caller) is reraised with its original stacktrace intact.

# `wrap_clickhouse_error`

```elixir
@spec wrap_clickhouse_error(term()) :: AshClickhouse.Error.ClickhouseError.t()
```

Wraps a ClickHouse client error into an Ash-compatible error.

---

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