#[cfg(feature = "scrape")]
pub type HtmlPostError = crate::types::html_post::FromHtmlError;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("reqwest http error")]
Reqwest(#[from] reqwest::Error),
#[error(transparent)]
InvalidUrl(#[from] url::ParseError),
#[error(transparent)]
InvalidJson(#[from] serde_json::Error),
#[error("invalid html post")]
#[cfg(feature = "scrape")]
InvalidHtmlPost(#[from] HtmlPostError),
#[error("failed to join tokio task")]
TokioJoin(#[from] tokio::task::JoinError),
#[error("xml deserialize error")]
XmlDeserialize(#[from] quick_xml::DeError),
#[error("the limit {0} is too large")]
LimitTooLarge(u16),
}