use thiserror::Error;
#[derive(Error, Debug)]
pub enum QueryError {
#[error("Failed to initialize query store: {error}")]
FailedInitializingQueryStore { error: String },
#[error(
"Unsupported SPARQL query result format: '{format}'. Valid formats are: {}", .formats.join(", ")
)]
UnsupportedResultQueryFormat { format: String, formats: Vec<String> },
#[error("Unsupported SPARQL query type: '{query_type}'. Valid types are: {}", .variants.join(", "))]
UnsupportedQueryType { query_type: String, variants: Vec<String> },
#[error("Data source specification error: {message}")]
DataSourceSpec { message: String },
#[error("Failed to parse SPARQL query from '{source_name}': {error}")]
FailedParsingQuery { source_name: String, error: String },
#[error("No SPARQL query loaded. Please load a SPARQL query before attempting to serialize.")]
NoQueryLoaded,
#[error("Failed to serialize SPARQL query: {error}")]
FailedSerializingQuery { error: String },
#[error("Failed to execute {query_type} query: {error}")]
FailedExecutingQuery { query_type: String, error: String },
#[error("No query results available. Please run a SPARQL query before attempting to serialize results.")]
NoQueryResultsAvailable,
#[error("Failed to serialize SPARQL query results: {error}")]
FailedSerializingQueryResults { error: String },
}