Hmbown/CodeWhale · error

custom theme requires custom_theme_name

Error message

custom theme requires custom_theme_name

What it means

Error "custom theme requires custom_theme_name" thrown in Hmbown/CodeWhale.

Source

Thrown at crates/tui/src/config_ui.rs:852

        validate_and_normalize_model(config, identity.provider, model)
            .map_err(|err| anyhow::anyhow!("invalid provider_models.{provider_id} value: {err}"))?;
    }
    if doc.config.mcp_config_path.trim().is_empty() {
        bail!("mcp_config_path cannot be empty");
    }
    let _ = theme_setting_for_document(doc)?;
    Ok(())
}

fn theme_setting_for_document(doc: &ConfigUiDocument) -> Result<String> {
    let setting = if doc.settings.theme == UiThemeValue::Custom {
        let name = doc
            .settings
            .custom_theme_name
            .as_deref()
            .map(str::trim)
            .filter(|name| !name.is_empty())
            .ok_or_else(|| anyhow::anyhow!("custom theme requires custom_theme_name"))?;
        format!("{}{}", crate::palette::USER_THEME_PREFIX, name)
    } else {
        doc.settings.theme.as_setting().to_string()
    };
    crate::palette::resolve_theme_setting(&setting, None)
        .map(|(normalized, _, _)| normalized)
        .map_err(anyhow::Error::msg)
}

/// Validate and normalize a model against the provider's *effective* route.
///
/// A custom DeepSeek base URL owns its own model namespace, so non-DeepSeek ids
/// must be accepted here the same way request-time
/// `wire_model_for_provider_route` preserves them. The previous provider-only
/// gate rejected those saves even though the live session could use them.
fn validate_and_normalize_model(
    config: &Config,
    provider: crate::config::ApiProvider,

View on GitHub (pinned to 8880682c63)

When it happens

Trigger: Thrown at crates/tui/src/config_ui.rs:852 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/55ad84aece9a8bb5. Report an issue: GitHub.