zeroclaw-labs/zeroclaw · error · anyhow::Error
Proxy is enabled but no proxy URL is configured. Set at leas
Error message
Proxy is enabled but no proxy URL is configured. Set at least one of http_proxy, https_proxy, or all_proxy
What it means
ProxyConfig::validate requires that an enabled proxy have at least one URL among http_proxy, https_proxy, or all_proxy after normalization — blank strings do not count. An enabled proxy with nothing to route through is treated as a configuration bug rather than silently ignored.
Source
Thrown at crates/zeroclaw-config/src/schema.rs:9869
("http_proxy", self.http_proxy.as_deref()),
("https_proxy", self.https_proxy.as_deref()),
("all_proxy", self.all_proxy.as_deref()),
] {
if let Some(url) = normalize_proxy_url_option(value) {
validate_proxy_url(field, &url)?;
}
}
for selector in self.normalized_services() {
if !is_supported_proxy_service_selector(&selector) {
anyhow::bail!(
"Unsupported proxy service selector '{selector}'. Use tool `proxy_config` action `list_services` for valid values"
);
}
}
if self.enabled && !self.has_any_proxy_url() {
anyhow::bail!(
"Proxy is enabled but no proxy URL is configured. Set at least one of http_proxy, https_proxy, or all_proxy"
);
}
if self.enabled
&& self.scope == ProxyScope::Services
&& self.normalized_services().is_empty()
{
anyhow::bail!(
"proxy.scope='services' requires a non-empty proxy.services list when proxy is enabled"
);
}
Ok(())
}
pub fn should_apply_to_service(&self, service_key: &str) -> bool {
if !self.enabled {View on GitHub (pinned to 88bb9c8533)
Solutions
- Set at least one URL, e.g. all_proxy = "http://127.0.0.1:7890" (or http_proxy/https_proxy as appropriate).
- If you did not mean to route through a proxy, set proxy.enabled = false.
- Verify the URL is well-formed (scheme and host present) so validation proceeds past the URL checks.
Example fix
# before [proxy] enabled = true # after [proxy] enabled = true all_proxy = "http://127.0.0.1:7890"
Defensive patterns
Strategy: validation
Validate before calling
// mirror has_any_proxy_url: normalization means blank strings do not count
let has_url = ["http_proxy", "https_proxy", "all_proxy"]
.iter()
.any(|k| cfg_value(k).map_or(false, |v| !v.trim().is_empty()));
if cfg.proxy.enabled && !has_url { /* set a URL or disable proxy before validate() */ } Type guard
fn proxy_ready(enabled: bool, urls: &[Option<String>]) -> bool {
!enabled || urls.iter().any(|u| u.as_deref().map_or(false, |v| !v.trim().is_empty()))
} Try / catch
match cfg.proxy.validate() {
Err(e) if e.to_string().contains("no proxy URL is configured") => {
// set all_proxy (or http/https_proxy), or set enabled = false
}
other => other,
} Prevention
- Never enable the proxy block without at least one URL in the same change.
- Treat empty-string URL fields as unset — normalization discards them.
- Validate the proxy block in CI for templated configs.
When it happens
Trigger: proxy.enabled = true with all three URL fields absent, empty, or whitespace-only. Because normalization runs first, http_proxy = "" does not satisfy the check.
Common situations: Flipping proxy.enabled in a template before filling in the URL; toggling proxy on to experiment; configs whose proxy URL came from an env expansion that produced an empty string.
Related errors
- Unsupported proxy service selector '{selector}'. Use tool `p
- proxy.scope='services' requires a non-empty proxy.services l
- '{field}' must be a string or string[]
- matrix: `homeserver` is required
- Cannot persist empty Telegram identity
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/d3105edcfee9f608.
Report an issue: GitHub.