Comprehensive error handling for ScyllaDB-specific errors.
This module provides structured error types for ScyllaDB/Cassandra errors, user-friendly error messages, and suggestions for resolving common issues.
Error Categories
- Connection Errors: Issues connecting to ScyllaDB nodes
- Query Errors: Invalid CQL syntax, type mismatches
- Consistency Errors: Write/read consistency failures
- Schema Errors: Table, keyspace, or column not found
- Rate Limiting: Overloaded nodes, timeout errors
- Configuration Errors: Invalid configuration options
Usage
case repo.query(query, params) do
{:ok, result} ->
{:ok, result}
{:error, %Xandra.Error{} = error} ->
{:error, AshScylla.Error.ScyllaError.from_xandra_error(error)}
{:error, %Xandra.ConnectionError{} = error} ->
{:error, AshScylla.Error.ScyllaError.from_xandra_connection_error(error)}
end
Summary
Functions
Creates a ScyllaError from a generic error.
Creates a ScyllaError from a Xandra.ConnectionError.
Creates a ScyllaError from a Xandra.Error.
Converts the error to a human-readable string.