1#[cfg(feature = "scrape")]
3pub type HtmlPostError = crate::types::html_post::FromHtmlError;
4
5#[derive(Debug, thiserror::Error)]
7#[non_exhaustive]
8pub enum Error {
9 #[error("reqwest http error")]
11 Reqwest(#[from] reqwest::Error),
12
13 #[error(transparent)]
15 InvalidUrl(#[from] url::ParseError),
16
17 #[error(transparent)]
19 InvalidJson(#[from] serde_json::Error),
20
21 #[error("invalid html post")]
23 #[cfg(feature = "scrape")]
24 InvalidHtmlPost(#[from] HtmlPostError),
25
26 #[error("failed to join tokio task")]
28 TokioJoin(#[from] tokio::task::JoinError),
29
30 #[error("xml deserialize error")]
32 XmlDeserialize(#[from] quick_xml::DeError),
33
34 #[error("the limit {0} is too large")]
36 LimitTooLarge(u16),
37
38 #[error("missing authentication")]
40 MissingAuth,
41}