#[non_exhaustive]pub enum ProxyError {
PoolExhausted,
AllProxiesUnhealthy,
InvalidProxyUrl {
url: String,
reason: String,
},
HealthCheckFailed {
proxy: String,
message: String,
},
CircuitOpen {
proxy: String,
},
StorageError(String),
ConfigError(String),
FetchFailed {
origin: String,
message: String,
},
NoCompatibleProxy,
CoherenceMismatch {
field: MismatchField,
severity: MismatchSeverity,
},
InvalidGeoMetadata {
field: String,
reason: String,
},
}Expand description
Errors that can occur within the stygian-proxy library.
§Examples
use stygian_proxy::error::{ProxyError, ProxyResult};
fn example() -> ProxyResult<()> {
Err(ProxyError::PoolExhausted)
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PoolExhausted
The proxy pool has no available proxies to hand out.
AllProxiesUnhealthy
Every proxy in the pool is currently unhealthy or has an open circuit.
InvalidProxyUrl
A supplied proxy URL failed validation.
Fields
HealthCheckFailed
A health check request for a proxy failed.
Fields
CircuitOpen
The circuit breaker for this proxy is open — calls are being rejected fast.
StorageError(String)
An error from the underlying storage layer.
ConfigError(String)
A configuration error.
FetchFailed
A remote proxy list could not be fetched or parsed.
Fields
NoCompatibleProxy
No proxy in the pool satisfies the requested capability set.
CoherenceMismatch
Coherence validator emitted a hard mismatch on a field registered
for hard-fail behaviour in crate::ports::coherence::CoherencePolicy.
Only emitted by
[crate::manager::ProxyManager::acquire_proxy_with_coherence] when
the coherence-validation cargo feature is enabled and the
configured policy lists the offending field as a hard-fail
vector.
Fields
field: MismatchFieldWhich vector disagreed (proxy geo vs DNS, WebRTC /16, …).
severity: MismatchSeveritySeverity classification from the validator.
InvalidGeoMetadata
A supplied geo-metadata field on
crate::types::ProxyCapabilities failed ingest-time
validation.
Emitted by the storage adapter’s add path (and by
crate::manager::ProxyManager::add_proxy_with_metadata) when
asn, city, or postal_code is malformed. Examples:
asn = 0, asn = u32::MAX (both reserved), city = "",
postal_code = "", or any field exceeding the documented
length ceiling.
Trait Implementations§
Source§impl Debug for ProxyError
impl Debug for ProxyError
Source§impl Display for ProxyError
impl Display for ProxyError
Source§impl Error for ProxyError
impl Error for ProxyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()