use std::time::Duration; use thiserror::Error; #[derive(Clone, Debug, Eq, Error, PartialEq)] pub enum HfSourceError { #[error("Hugging Face source request is invalid")] InvalidRequest, #[error("Hugging Face source authorization failed")] Authorization, #[error("Hugging Face source was not found")] NotFound, #[error("Hugging Face source changed")] SourceChanged, #[error("Hugging Face source returned an unsupported entry")] UnsupportedEntry, #[error("Hugging Face source response is invalid")] InvalidResponse, #[error("Hugging Face source inventory is invalid")] InvalidInventory, #[error("Hugging Face inventory capacity is exhausted")] Capacity, #[error("Hugging Face source failed transiently")] Transient { retry_after: Option }, }