{"record":{"id":"08d7fd08821b9508","repo":"tinyhumansai/openhuman","slug":"proxy-is-disabled-use-action-set-with-enabled-t","errorCode":null,"errorMessage":"Proxy is disabled. Use action 'set' with enabled=true first","messagePattern":"Proxy is disabled\\. Use action 'set' with enabled=true first","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/proxy_config.rs","lineNumber":279,"sourceCode":"            .unwrap_or(clear_env_default);\n        if clear_env {\n            ProxyConfig::clear_process_env();\n        }\n\n        Ok(ToolResult::success(serde_json::to_string_pretty(&json!({\n            \"message\": \"Proxy disabled\",\n            \"proxy\": Self::proxy_json(&cfg.proxy),\n            \"environment\": Self::env_snapshot(),\n        }))?))\n    }\n\n    fn handle_apply_env(&self) -> anyhow::Result<ToolResult> {\n        let cfg = self.load_config_without_env()?;\n        let proxy = cfg.proxy;\n        proxy.validate()?;\n\n        if !proxy.enabled {\n            anyhow::bail!(\"Proxy is disabled. Use action 'set' with enabled=true first\");\n        }\n\n        if proxy.scope != ProxyScope::Environment {\n            anyhow::bail!(\n                \"apply_env only works when proxy.scope is 'environment' (current: {:?})\",\n                proxy.scope\n            );\n        }\n\n        proxy.apply_to_process_env();\n        set_runtime_proxy_config(proxy.clone());\n\n        Ok(ToolResult::success(serde_json::to_string_pretty(&json!({\n            \"message\": \"Proxy environment variables applied\",\n            \"proxy\": Self::proxy_json(&proxy),\n            \"environment\": Self::env_snapshot(),\n        }))?))\n    }","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/proxy_config.rs#L261-L297","documentation":"handle_apply_env loaded the persisted proxy configuration and found enabled=false, so there is nothing to export into the process environment; the user is directed to enable the proxy before applying it.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/proxy_config.rs:279 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run action 'set' with enabled=true to enable the proxy first","Then re-run action 'apply_env'"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}