{"record":{"id":"3f4a65cfc97a386a","repo":"tinyhumansai/openhuman","slug":"invalid-mode-other-expected-tap-push","errorCode":null,"errorMessage":"invalid --mode '{other}', expected tap|push","messagePattern":"invalid --mode '(.+?)', expected tap\\|push","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/voice/cli.rs","lineNumber":91,"sourceCode":"\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()?;\n\n    rt.block_on(async {\n        let mut config = match crate::openhuman::config::Config::load_or_init().await {\n            Ok(cfg) => cfg,\n            Err(e) => {\n                log::warn!(\"[voice-cli] config load failed, using defaults: {e}\");\n                crate::openhuman::config::Config::default()\n            }\n        };\n        config.apply_env_overrides();\n\n        let activation_mode = match mode.as_deref() {\n            Some(\"tap\") => ActivationMode::Tap,\n            Some(\"push\") | None => ActivationMode::Push,\n            Some(other) => return Err(anyhow!(\"invalid --mode '{other}', expected tap|push\")),\n        };\n\n        let server_config = VoiceServerConfig {\n            hotkey: hotkey.unwrap_or_else(|| config.voice_server.hotkey.clone()),\n            activation_mode,\n            skip_cleanup,\n            context: None,\n            min_duration_secs: config.voice_server.min_duration_secs,\n            silence_threshold: config.voice_server.silence_threshold,\n            custom_dictionary: config.voice_server.custom_dictionary.clone(),\n        };\n\n        run_standalone(config, server_config)\n            .await\n            .map_err(anyhow::Error::msg)\n    })?;\n\n    Ok(())","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/voice/cli.rs#L73-L109","documentation":"After CLI parsing, the --mode value is matched against the two activation modes; anything other than tap/push (e.g. \"hold\" or a typo) reaches this error before the dictation listener starts.","triggerScenarios":"Thrown at src/openhuman/voice/cli.rs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use `--mode tap` or `--mode push`, or omit --mode for the push default"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}