tinyhumansai/openhuman · error · anyhow::Error

unknown sentry-test arg

Error message

unknown sentry-test arg: {other}

What it means

CLI argument parsing in run_sentry_test_command: an unrecognized argument was passed to the sentry-test subcommand (only --message, --panic and -h/--help are accepted). Usage error naming the offending token in `{other}`; check spelling or run with --help for accepted flags.

Solutions

  1. Run `openhuman sentry-test --help` to see accepted flags
  2. Remove or correct the misspelled argument
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/cli.rs:267 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/91532d0f6c4b9a76. Report an issue: GitHub.

Appendix: source

Thrown at src/core/cli.rs:267

                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)"
                );
                println!("at runtime, or baked into the binary at build time via option_env!. On");
                println!("success, prints the event UUID to stdout.");
                return Ok(());
            }
            other => return Err(anyhow::anyhow!("unknown sentry-test arg: {other}")),
        }
    }

    let client = sentry::Hub::current().client();
    let dsn_host = client
        .as_deref()
        .and_then(|c| c.dsn())
        .map(|d| d.host().to_string());

    match &dsn_host {
        Some(host) => eprintln!("[sentry-test] Sentry client active (dsn host: {host})"),
        None => {
            return Err(anyhow::anyhow!(
                "Sentry is not initialized in this binary — no DSN is resolvable. \
                 Set OPENHUMAN_CORE_SENTRY_DSN (or the legacy OPENHUMAN_SENTRY_DSN alias) \
                 in the environment (or rebuild with it defined at compile time) and try again."
            ));
        }

View on GitHub (pinned to 7491200858)