use thiserror::Error;
#[derive(Error, Debug)]
pub enum AppError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("Parser error: {0}")]
Parser(String),
#[error("Index error: {0}")]
Index(String),
#[error("Generic error: {0}")]
Generic(String),
}
pub type Result<T> = std::result::Result<T, AppError>;