//! Error types for cg-coin

use thiserror::Error;

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

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

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

    #[allow(dead_code)]
    #[error("Coin not found: {0}")]
    CoinNotFound(String),
}

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