use thiserror::Error;
pub type Result<T> = std::result::Result<T, BifrostError>;
#[derive(Debug, Error)]
pub enum BifrostError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("YAML parse error: {0}")]
Yaml(#[from] serde_yaml::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("RON parse error: {0}")]
RonParse(#[from] ron::error::SpannedError),
#[error("RON serialize error: {0}")]
RonSer(#[from] ron::Error),
#[error("Arrow error: {0}")]
Arrow(#[from] arrow::error::ArrowError),
#[error("FalkorDB error: {0}")]
Falkor(#[from] graphar_falkordb::FalkorError),
#[error("Valkey error: {0}")]
Valkey(#[from] redis::RedisError),
#[error("Column '{0}' not found in table batch")]
ColumnNotFound(String),
#[error("transform produces two output columns named '{0}' (endpoint/property name collision)")]
DuplicateOutputColumn(String),
#[error("Custom transform '{0}' is not registered — call TransformRegistry::register first")]
TransformNotRegistered(String),
#[error("Table '{0}' has an empty pipeline")]
EmptyPipeline(String),
#[error("Source error: {0}")]
Source(String),
#[error("full reload required: {0}")]
FullReloadRequired(String),
#[error("{0}")]
Other(String),
}