{"record":{"id":"8be39346cba6f7cd","repo":"Hmbown/CodeWhale","slug":"failed-to-update-setting-invalid-locale-value","errorCode":null,"errorMessage":"Failed to update setting: invalid locale '{value}'. Expected: {}.","messagePattern":"Failed to update setting: invalid locale '(.+?)'\\. Expected: (.+?)\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/settings.rs","lineNumber":1342,"sourceCode":"            }\n            \"pin_last_prompt\" | \"pin_prompt\" => {\n                self.pin_last_prompt = parse_bool(value)?;\n            }\n            \"show_tool_details\" | \"tool_details\" => {\n                self.show_tool_details = parse_bool(value)?;\n            }\n            \"inline_diffs\" | \"inline_diff\" | \"diffs\" => {\n                let normalized = value.trim().to_ascii_lowercase();\n                if !matches!(normalized.as_str(), \"full\" | \"summary\" | \"off\") {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid inline diff mode '{value}'. Expected: full, summary, or off.\"\n                    );\n                }\n                self.inline_diffs = normalized;\n            }\n            \"locale\" | \"language\" => {\n                let Some(locale) = normalize_configured_locale(value) else {\n                    anyhow::bail!(\n                        \"Failed to update setting: invalid locale '{value}'. Expected: {}.\",\n                        crate::localization::configured_locale_values(\", \")\n                    );\n                };\n                self.locale = locale.to_string();\n            }\n            \"theme\" => {\n                self.theme = normalize_theme_setting(value).map_err(anyhow::Error::msg)?;\n            }\n            \"ui_theme\" => {\n                self.theme = normalize_theme_setting(value).map_err(anyhow::Error::msg)?;\n            }\n            \"background_color\" | \"background\" | \"bg\" => {\n                self.background_color = normalize_background_color_setting(value)?;\n            }\n            \"composer_density\" | \"composer\" => {\n                let normalized = normalize_composer_density(value);\n                if ![\"compact\", \"comfortable\", \"spacious\"].contains(&normalized) {","sourceCodeStart":1324,"sourceCodeEnd":1360,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/settings.rs#L1324-L1360","documentation":"Settings update validation for the locale key: the value did not match any locale the localization layer reports as configured/available (the expected list is embedded dynamically). Case/spacing is normalized first, so this is a genuine unknown-locale error.","triggerScenarios":"Thrown at crates/tui/src/settings.rs:1342 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pick a locale from the list embedded in the message","Check available localization values"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}