use alloc::string::String;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("invalid proxy URL: {0}")]
InvalidProxyUrl(#[from] url::ParseError),
#[error("proxy URL is missing a host")]
MissingProxyHost,
#[error("proxy username is not valid UTF-8")]
InvalidProxyUsername,
#[error("proxy password is not valid UTF-8")]
InvalidProxyPassword,
#[error("unsupported proxy scheme: {0}")]
UnsupportedProxyScheme(String),
#[error("API key must be set and nonempty")]
MissingApiKey,
#[error("API key contains invalid HTTP header bytes")]
InvalidApiKey,
#[cfg(feature = "std")]
#[error("failed to load native TLS roots: {0}")]
NativeRoots(#[from] std::io::Error),
#[cfg(feature = "std")]
#[error("failed to configure TLS: {0}")]
Tls(#[from] rustls::Error),
}