AshClickhouse.Error (AshClickhouse v0.6.2)

Copy Markdown View Source

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.

Summary

Functions

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

Reraises a rescued exception, converting client errors to ClickhouseError.

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

Functions

client_error?(arg1)

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

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

reraise_or_wrap(e, stacktrace)

@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(error)

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

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