use thiserror::Error;
use crate::{
components::{contract_runtime, small_network, storage},
utils::ListeningError,
};
#[derive(Debug, Error)]
pub(crate) enum Error {
#[error("prometheus (metrics) error: {0}")]
Metrics(#[from] prometheus::Error),
#[error("small network error: {0}")]
SmallNetwork(#[from] small_network::Error),
#[error("http server listening error: {0}")]
HttpServerListening(#[from] ListeningError),
#[error("storage error: {0}")]
Storage(#[from] storage::Error),
#[error("consensus error: {0}")]
Consensus(#[from] anyhow::Error),
#[error("contract runtime config error: {0}")]
ContractRuntime(#[from] contract_runtime::ConfigError),
}