{"record":{"id":"29824e6360b5e6f4","repo":"zeroclaw-labs/zeroclaw","slug":"jira-base-url-must-not-be-empty-when-jira-enabled","errorCode":null,"errorMessage":"jira.base_url must not be empty when jira.enabled = true","messagePattern":"jira\\.base_url must not be empty when jira\\.enabled = true","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-config/src/schema.rs","lineNumber":22065,"sourceCode":"            }\n        }\n\n        // Pinggy tunnel region — validate allowed values (case-insensitive, auto-lowercased at runtime).\n        if let Some(ref pinggy) = self.tunnel.pinggy\n            && let Some(ref region) = pinggy.region\n        {\n            let r = region.trim().to_ascii_lowercase();\n            if !r.is_empty() && !matches!(r.as_str(), \"us\" | \"eu\" | \"ap\" | \"br\" | \"au\") {\n                anyhow::bail!(\n                    \"tunnel.pinggy.region must be one of: us, eu, ap, br, au (or omitted for auto)\"\n                );\n            }\n        }\n\n        // Jira\n        if self.jira.enabled {\n            if self.jira.base_url.trim().is_empty() {\n                anyhow::bail!(\"jira.base_url must not be empty when jira.enabled = true\");\n            }\n            if self.jira.api_token.trim().is_empty()\n                && std::env::var(\"JIRA_API_TOKEN\")\n                    .unwrap_or_default()\n                    .trim()\n                    .is_empty()\n            {\n                anyhow::bail!(\n                    \"jira.api_token must be set (or JIRA_API_TOKEN env var) when jira.enabled = true\"\n                );\n            }\n            let valid_actions = [\n                \"get_ticket\",\n                \"search_tickets\",\n                \"comment_ticket\",\n                \"list_projects\",\n                \"myself\",\n                \"list_transitions\",","sourceCodeStart":22047,"sourceCodeEnd":22083,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-config/src/schema.rs#L22047-L22083","documentation":"Thrown by Config::validate when jira.enabled = true but jira.base_url is empty after trimming. The Jira integration resolves every API endpoint (tickets, search, transitions) relative to this base URL, so an enabled integration without a host is a hard configuration error. Validation stops before any network activity. The same block subsequently requires an api token and validates allowed_actions.","triggerScenarios":"Setting `jira.enabled = true` with no `base_url`, an empty string, or whitespace; enabling Jira while intending to fill the URL in later; a config templating step that drops the field.","commonSituations":"User enables Jira before deciding which instance (company Atlassian cloud vs self-hosted Jira Server) it targets; base_url held in an env var in the user's head but never written to config; copy-paste from docs example that commented the field out.","solutions":["Set jira.base_url to the Jira instance root, e.g. \"https://yourcompany.atlassian.net\" (no trailing /rest path needed)","Or set jira.enabled = false until the instance URL is known","Verify the URL scheme is https and the host resolves, to avoid the next failure being at request time"],"exampleFix":"# before\n[jira]\nenabled = true\nbase_url = \"\"\n\n# after\n[jira]\nenabled = true\nbase_url = \"https://yourcompany.atlassian.net\"","handlingStrategy":"validation","validationCode":"fn jira_base_url_ok(j: &JiraConfig) -> bool {\n    !j.enabled || !j.base_url.trim().is_empty()\n}","typeGuard":null,"tryCatchPattern":"match cfg.validate() {\n    Err(e) if e.to_string().starts_with(\"jira.base_url\") => {\n        eprintln!(\"Set [jira] base_url (e.g. https://yourcompany.atlassian.net) or disable jira\");\n    }\n    other => other?,\n}","preventionTips":["Populate base_url from the same source of truth that enables Jira (env pair JIRA_URL/JIRA_ENABLED)","Validate configs in CI with cfg.validate() so a half-configured section fails the build, not prod"],"tags":["jira","config","validation","integration","toml"],"backgroundTag":"config-validation-failed","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}