{"record":{"id":"56d10b6e0e62d5df","repo":"tinyhumansai/openhuman","slug":"proxy-is-enabled-but-no-proxy-url-is-configured-s","errorCode":null,"errorMessage":"Proxy is enabled but no proxy URL is configured. Set at least one of http_proxy, https_proxy, or all_proxy","messagePattern":"Proxy is enabled but no proxy URL is configured\\. Set at least one of http_proxy, https_proxy, or all_proxy","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/config/schema/proxy.rs","lineNumber":129,"sourceCode":"            (\"http_proxy\", self.http_proxy.as_deref()),\n            (\"https_proxy\", self.https_proxy.as_deref()),\n            (\"all_proxy\", self.all_proxy.as_deref()),\n        ] {\n            if let Some(url) = normalize_proxy_url_option(value) {\n                validate_proxy_url(field, &url)?;\n            }\n        }\n\n        for selector in self.normalized_services() {\n            if !is_supported_proxy_service_selector(&selector) {\n                anyhow::bail!(\n                    \"Unsupported proxy service selector '{selector}'. Use tool `proxy_config` action `list_services` for valid values\"\n                );\n            }\n        }\n\n        if self.enabled && !self.has_any_proxy_url() {\n            anyhow::bail!(\n                \"Proxy is enabled but no proxy URL is configured. Set at least one of http_proxy, https_proxy, or all_proxy\"\n            );\n        }\n\n        if self.enabled\n            && self.scope == ProxyScope::Services\n            && self.normalized_services().is_empty()\n        {\n            anyhow::bail!(\n                \"proxy.scope='services' requires a non-empty proxy.services list when proxy is enabled\"\n            );\n        }\n\n        Ok(())\n    }\n\n    pub fn should_apply_to_service(&self, service_key: &str) -> bool {\n        if !self.enabled {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/config/schema/proxy.rs#L111-L147","documentation":"`ProxyConfig` validation requires at least one proxy URL — `http_proxy`, `https_proxy`, or `all_proxy` — whenever `proxy.enabled = true`. An enabled proxy with nothing to route through is rejected at load/update time (`has_any_proxy_url()` returns false) rather than silently not proxying anything. The adjacent rule enforces that `scope = \"services\"` additionally has a non-empty `services` list.","triggerScenarios":"Setting `proxy.enabled = true` in config.toml or via the proxy_config tool/UI while none of the three proxy URL fields is set — including cases where the URLs were assumed to come from environment variables but the config fields were never populated.","commonSituations":"Toggling the proxy on before filling in the URL; expecting HTTP_PROXY/HTTPS_PROXY env vars to satisfy the config fields; copy-pasted config snippets that omit the URL lines.","solutions":["Set at least one of `http_proxy`, `https_proxy`, or `all_proxy` to a valid URL (e.g. `http://127.0.0.1:7890`) while `enabled = true`.","Or keep/set `enabled = false` until a proxy URL is actually configured.","Remember the sibling rule: `scope = \"services\"` also requires a non-empty `services` list when enabled."],"exampleFix":"# before\n[proxy]\nenabled = true\n\n# after\n[proxy]\nenabled = true\nhttp_proxy = \"http://127.0.0.1:7890\"","handlingStrategy":"validation","validationCode":"if proxy.enabled && [proxy.http_proxy.as_ref(), proxy.https_proxy.as_ref(), proxy.all_proxy.as_ref()]\n    .iter()\n    .all(|u| u.is_none())\n{\n    // set at least one proxy URL, or keep enabled=false — do not save this state\n}","typeGuard":"fn proxy_config_is_coherent(p: &ProxyConfig) -> bool {\n    !p.enabled || p.has_any_proxy_url()\n}","tryCatchPattern":null,"preventionTips":["Set the proxy URL first, then flip enabled to true","Do not expect HTTP_PROXY/HTTPS_PROXY env vars to satisfy the config fields — populate http_proxy/https_proxy/all_proxy explicitly","Remember the sibling rule: scope='services' also requires a non-empty services list when enabled"],"tags":["proxy","config","validation","missing-url"],"backgroundTag":"invalid-proxy-configuration","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}