Hmbown/CodeWhale · error · anyhow::Error
Failed to update setting: invalid locale '{value}'. Expected
Error message
Failed to update setting: invalid locale '{value}'. Expected: {}. What it means
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.
Source
Thrown at crates/tui/src/settings.rs:1342
}
"pin_last_prompt" | "pin_prompt" => {
self.pin_last_prompt = parse_bool(value)?;
}
"show_tool_details" | "tool_details" => {
self.show_tool_details = parse_bool(value)?;
}
"inline_diffs" | "inline_diff" | "diffs" => {
let normalized = value.trim().to_ascii_lowercase();
if !matches!(normalized.as_str(), "full" | "summary" | "off") {
anyhow::bail!(
"Failed to update setting: invalid inline diff mode '{value}'. Expected: full, summary, or off."
);
}
self.inline_diffs = normalized;
}
"locale" | "language" => {
let Some(locale) = normalize_configured_locale(value) else {
anyhow::bail!(
"Failed to update setting: invalid locale '{value}'. Expected: {}.",
crate::localization::configured_locale_values(", ")
);
};
self.locale = locale.to_string();
}
"theme" => {
self.theme = normalize_theme_setting(value).map_err(anyhow::Error::msg)?;
}
"ui_theme" => {
self.theme = normalize_theme_setting(value).map_err(anyhow::Error::msg)?;
}
"background_color" | "background" | "bg" => {
self.background_color = normalize_background_color_setting(value)?;
}
"composer_density" | "composer" => {
let normalized = normalize_composer_density(value);
if !["compact", "comfortable", "spacious"].contains(&normalized) {View on GitHub (pinned to 0c42157ee5)
Solutions
- Pick a locale from the list embedded in the message
- Check available localization values
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/settings.rs:1342 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/8be39346cba6f7cd.
Report an issue: GitHub.