use thiserror::Error;

#[derive(Error, Debug)]
pub enum RiceError {
    #[error("Configuration error: {0}")]
    Config(#[from] config::ConfigError),
    
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("gRPC error: {0}")]
    Grpc(#[from] tonic::Status),

    #[error("Transport error: {0}")]
    Transport(#[from] tonic::transport::Error),

    #[error("HTTP error: {0}")]
    Http(#[from] reqwest::Error), // reqwest needs to be added to rice-core deps if used here, or handled in sub-crates

    #[error("Missing client: {0}")]
    MissingClient(String),
}
