use thiserror::Error;

#[derive(Debug, Error)]
pub enum KGError {
    #[error("Database error: {0}")]
    DatabaseError(String),

    #[error("Query error: {0}")]
    QueryError(String),

    #[error("Record not found: {0}")]
    NotFound(String),

    #[error("Invalid data: {0}")]
    InvalidData(String),

    #[error("Serialization error: {0}")]
    SerializationError(#[from] serde_json::Error),

    #[error("Connection error: {0}")]
    ConnectionError(String),

    #[error("Reasoning error: {0}")]
    ReasoningError(String),
}

pub type Result<T> = std::result::Result<T, KGError>;
