1use hopr_lib::GeneralError;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
6pub enum StrategyError {
7 #[error("criteria to trigger the strategy were not satisfied")]
8 CriteriaNotSatisfied,
9
10 #[error("non-specific strategy error: {0}")]
11 Other(Box<dyn std::error::Error + Send + Sync>),
12
13 #[error(transparent)]
14 HoprLib(#[from] hopr_lib::errors::HoprLibError),
15
16 #[error("lower-level error: {0}")]
17 GeneralError(#[from] GeneralError),
18}
19
20pub type Result<T> = std::result::Result<T, StrategyError>;