{"record":{"id":"e4771017760335f1","repo":"tinyhumansai/openhuman","slug":"invalid-scope-scope-use-environment-openhuman","errorCode":null,"errorMessage":"Invalid scope '{scope}'. Use environment|openhuman|services","messagePattern":"Invalid scope '(.+?)'\\. Use environment\\|openhuman\\|services","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/proxy_config.rs","lineNumber":174,"sourceCode":"\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;\n                touched_proxy_url = true;\n            }\n            MaybeSet::Unset => {}\n        }\n\n        match Self::parse_optional_string_update(args, \"https_proxy\")? {\n            MaybeSet::Set(update) => {\n                proxy.https_proxy = Some(update);","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/proxy_config.rs#L156-L192","documentation":"After 'scope' parses as a string, handle_set validates it against the three supported proxy scopes; this fires on any other value (typo, casing, invented scope). Nothing is written to config.toml.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/proxy_config.rs:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use exactly one of \"environment\", \"openhuman\", or \"services\""],"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-14T05:17:10.506Z"}