//! Error types for cg-ohlc

use thiserror::Error;

#[derive(Error, Debug)]
pub enum CgOhlcError {
    #[error(transparent)]
    Common(#[from] cg_common::CgCommonError),

    #[error("JSON parsing error: {0}")]
    JsonError(#[from] serde_json::Error),

    #[error("Invalid input: {0}")]
    InvalidInput(String),
}

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