{"record":{"id":"da293e71c57d50c8","repo":"Hmbown/CodeWhale","slug":"invalid-cost-currency-other-expected-usd-cny","errorCode":null,"errorMessage":"Invalid cost_currency '{other}': expected usd, cny, rmb, or yuan","messagePattern":"Invalid cost_currency '(.+?)': expected usd, cny, rmb, or yuan","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config_ui.rs","lineNumber":1287,"sourceCode":"    }\n\n    #[allow(dead_code)]\n    fn description(self) -> &'static str {\n        match self {\n            Self::Agent => \"Do the work in this session.\",\n            Self::Plan => \"Design first; implement after you approve.\",\n            Self::Operate => \"Dispatch workers; keep the parent free for steers.\",\n        }\n    }\n}\n\nimpl CostCurrencyValue {\n    fn from_setting(value: &str) -> Result<Self> {\n        match value.trim().to_ascii_lowercase().as_str() {\n            \"usd\" => Ok(Self::Usd),\n            \"cny\" | \"rmb\" | \"yuan\" => Ok(Self::Cny),\n            other => {\n                anyhow::bail!(\"Invalid cost_currency '{other}': expected usd, cny, rmb, or yuan\")\n            }\n        }\n    }\n\n    fn as_setting(self) -> &'static str {\n        match self {\n            Self::Usd => \"usd\",\n            Self::Cny => \"cny\",\n        }\n    }\n}\n\nimpl From<ApprovalMode> for ApprovalModeValue {\n    fn from(value: ApprovalMode) -> Self {\n        match value {\n            ApprovalMode::Auto => Self::Auto,\n            ApprovalMode::Bypass => Self::Bypass,\n            ApprovalMode::Suggest => Self::Suggest,","sourceCodeStart":1269,"sourceCodeEnd":1305,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/config_ui.rs#L1269-L1305","documentation":"Error \"Invalid cost_currency '{other}': expected usd, cny, rmb, or yuan\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/config_ui.rs:1287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}