1use alloc::string::String;
4
5#[derive(Debug, thiserror::Error)]
7pub enum Error {
8 #[error(transparent)]
10 Proxy(#[from] asimov_http::proxy::Error),
11
12 #[error("invalid proxy URL: {0}")]
14 InvalidProxyUrl(#[from] url::ParseError),
15
16 #[error("proxy URL is missing a host")]
18 MissingProxyHost,
19
20 #[error("proxy username is not valid UTF-8")]
22 InvalidProxyUsername,
23
24 #[error("proxy password is not valid UTF-8")]
26 InvalidProxyPassword,
27
28 #[error("unsupported proxy scheme: {0}")]
30 UnsupportedProxyScheme(String),
31
32 #[error("API key must be set and nonempty")]
34 MissingApiKey,
35
36 #[error("API key contains invalid HTTP header bytes")]
38 InvalidApiKey,
39
40 #[cfg(feature = "std")]
42 #[error("failed to load native TLS roots: {0}")]
43 NativeRoots(#[from] std::io::Error),
44
45 #[cfg(feature = "std")]
47 #[error("failed to configure TLS: {0}")]
48 Tls(#[from] rustls::Error),
49}