Hmbown/CodeWhale · error

Invalid cost_currency '{other}': expected usd, cny, rmb, or

Error message

Invalid cost_currency '{other}': expected usd, cny, rmb, or yuan

What it means

Error "Invalid cost_currency '{other}': expected usd, cny, rmb, or yuan" thrown in Hmbown/CodeWhale.

Source

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

    }

    #[allow(dead_code)]
    fn description(self) -> &'static str {
        match self {
            Self::Agent => "Do the work in this session.",
            Self::Plan => "Design first; implement after you approve.",
            Self::Operate => "Dispatch workers; keep the parent free for steers.",
        }
    }
}

impl CostCurrencyValue {
    fn from_setting(value: &str) -> Result<Self> {
        match value.trim().to_ascii_lowercase().as_str() {
            "usd" => Ok(Self::Usd),
            "cny" | "rmb" | "yuan" => Ok(Self::Cny),
            other => {
                anyhow::bail!("Invalid cost_currency '{other}': expected usd, cny, rmb, or yuan")
            }
        }
    }

    fn as_setting(self) -> &'static str {
        match self {
            Self::Usd => "usd",
            Self::Cny => "cny",
        }
    }
}

impl From<ApprovalMode> for ApprovalModeValue {
    fn from(value: ApprovalMode) -> Self {
        match value {
            ApprovalMode::Auto => Self::Auto,
            ApprovalMode::Bypass => Self::Bypass,
            ApprovalMode::Suggest => Self::Suggest,

View on GitHub (pinned to 8880682c63)

When it happens

Trigger: Thrown at crates/tui/src/config_ui.rs:1287 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/da293e71c57d50c8. Report an issue: GitHub.