media_tools/config/
media_config_error.rs1use thiserror::Error;
3
4#[derive(Debug, Clone, PartialEq, Eq, Error)]
6pub enum MediaConfigError {
7 #[error("country must be a two-letter uppercase ISO 3166-1 code, got '{0}'")]
8 InvalidCountry(String),
9 #[error("preferred language must not be empty")]
10 EmptyLanguage,
11 #[error("recommendation limit must be greater than zero")]
12 ZeroRecommendationLimit,
13 #[error("availability cache TTL must be greater than zero")]
14 ZeroAvailabilityCacheTtl,
15 #[error(
16 "recommendation weights must be non-negative and the older release window must not be shorter than the recent window"
17 )]
18 InvalidRecommendationWeights,
19}