//! Error types shared across the application

use thiserror::Error;

#[derive(Error, Debug)]
pub enum AppError {
    #[error("Configuration error: {0}")]
    Config(#[from] crate::config::ConfigError),

    #[error("Route not found: {0}")]
    RouteNotFound(String),

    #[error("Language not supported: {0}")]
    UnsupportedLanguage(String),

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

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

pub type AppResult<T> = Result<T, AppError>;
