tinyhumansai/openhuman · error · anyhow::Error

missing value for --message

Error message

missing value for --message

What it means

CLI argument parsing in run_sentry_test_command (only compiled with the crash-reporting feature): `--message` was passed with no following value. Usage error; supply the event body text, e.g. `--message "test ping"` (default is the sentry-test ping string).

Solutions

  1. Supply the text, e.g. `openhuman sentry-test --message "ping"`
  2. Use the inline form `--message=text`
  3. Omit --message; the default body "openhuman sentry-test ping" is used
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/cli.rs:243 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/bf5d2be39fccf5f2. Report an issue: GitHub.

Appendix: source

Thrown at src/core/cli.rs:243

/// DSN, the command exits non-zero with a diagnostic instead of silently
/// producing no telemetry.
///
/// Only compiled with the `crash-reporting` feature; the `#[cfg(not(...))]`
/// companion below returns a disabled-build error (mirrors the `mcp` CLI
/// precedent, where the subcommand arm + top-level help stay compiled and the
/// handler reports the build fact rather than a bogus "unknown command").
#[cfg(feature = "crash-reporting")]
fn run_sentry_test_command(args: &[String]) -> Result<()> {
    let mut message: Option<String> = None;
    let mut do_panic = false;
    let mut i = 0usize;

    while i < args.len() {
        match args[i].as_str() {
            "--message" => {
                message = Some(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow::anyhow!("missing value for --message"))?
                        .clone(),
                );
                i += 2;
            }
            "--panic" => {
                do_panic = true;
                i += 1;
            }
            "-h" | "--help" => {
                println!("Usage: openhuman sentry-test [--message <text>] [--panic]");
                println!();
                println!("  --message <text>  Body of the Error-level event sent to Sentry");
                println!("                    (default: \"openhuman sentry-test ping\")");
                println!("  --panic           After capturing the event, trigger a panic so the");
                println!("                    panic integration reports it as a separate event.");
                println!();
                println!(
                    "Requires OPENHUMAN_CORE_SENTRY_DSN (or the legacy OPENHUMAN_SENTRY_DSN alias)"

View on GitHub (pinned to 7491200858)