{"record":{"id":"c12d2255b13a9b43","repo":"tinyhumansai/openhuman","slug":"enabled-must-be-a-boolean","errorCode":null,"errorMessage":"'enabled' must be a boolean","messagePattern":"'enabled' must be a boolean","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/proxy_config.rs","lineNumber":166,"sourceCode":"            \"supported_selectors\": ProxyConfig::supported_service_selectors(),\n            \"usage_example\": {\n                \"action\": \"set\",\n                \"scope\": \"services\",\n                \"services\": [\"provider.openai\", \"tool.http_request\", \"channel.telegram\"]\n            }\n        }))?))\n    }\n\n    async fn handle_set(&self, args: &Value) -> anyhow::Result<ToolResult> {\n        let mut cfg = self.load_config_without_env()?;\n        let previous_scope = cfg.proxy.scope;\n        let mut proxy = cfg.proxy.clone();\n        let mut touched_proxy_url = false;\n\n        if let Some(enabled) = args.get(\"enabled\") {\n            proxy.enabled = enabled\n                .as_bool()\n                .ok_or_else(|| anyhow::anyhow!(\"'enabled' must be a boolean\"))?;\n        }\n\n        if let Some(scope_raw) = args.get(\"scope\") {\n            let scope = scope_raw\n                .as_str()\n                .ok_or_else(|| anyhow::anyhow!(\"'scope' must be a string\"))?;\n            proxy.scope = Self::parse_scope(scope).ok_or_else(|| {\n                anyhow::anyhow!(\"Invalid scope '{scope}'. Use environment|openhuman|services\")\n            })?;\n        }\n\n        match Self::parse_optional_string_update(args, \"http_proxy\")? {\n            MaybeSet::Set(update) => {\n                proxy.http_proxy = Some(update);\n                touched_proxy_url = true;\n            }\n            MaybeSet::Null => {\n                proxy.http_proxy = None;","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/proxy_config.rs#L148-L184","documentation":"In handle_set, the optional 'enabled' toggle must be a JSON boolean; this fires when args include 'enabled' as a string (\"true\") or number. Validation happens after config reload but before any proxy change is persisted.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/proxy_config.rs:166 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass \"enabled\" as a JSON boolean: true or false, unquoted"],"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"}