tinyhumansai/openhuman · error · anyhow::Error

Sentry is not initialized in this binary — no DSN is…

Error message

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.

What it means

Error "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." thrown in tinyhumansai/openhuman.

Solutions

  1. Set OPENHUMAN_CORE_SENTRY_DSN (or legacy alias OPENHUMAN_SENTRY_DSN) in the environment and retry
  2. Or rebuild with the DSN defined at compile time via option_env!
  3. Verify with `openhuman sentry-test --help` for the expected setup
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

Thrown at src/core/cli.rs:280

                );
                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."
            ));
        }
    }

    let msg = message.unwrap_or_else(|| "openhuman sentry-test ping".to_string());

    sentry::configure_scope(|scope| {
        scope.set_tag("test", "true");
        scope.set_tag("source", "sentry-test-cli");
    });

    let event_id = sentry::capture_message(&msg, sentry::Level::Error);

    if let Some(c) = client {
        if !c.flush(Some(std::time::Duration::from_secs(5))) {

View on GitHub (pinned to 7491200858)