tinyhumansai/openhuman · error

Sentry transport requires a DSN

Error message

Sentry transport requires a DSN

What it means

Input validation in the Sentry transport factory: a transport was requested without a DSN (the sentry.io project endpoint URL). Sentry cannot route events without one, so the factory refuses to build rather than silently dropping every event; the caller must supply a DSN or skip Sentry initialization.

Source

Thrown at src/core/sentry_transport.rs:49

        if let Some(url) = options.http_proxy.as_ref() {
            match reqwest::Proxy::http(url.as_ref()) {
                Ok(proxy) => builder = builder.proxy(proxy),
                Err(error) => sentry_debug!("invalid HTTP proxy: {error:?}"),
            }
        }
        if let Some(url) = options.https_proxy.as_ref() {
            match reqwest::Proxy::https(url.as_ref()) {
                Ok(proxy) => builder = builder.proxy(proxy),
                Err(error) => sentry_debug!("invalid HTTPS proxy: {error:?}"),
            }
        }
        let client = builder
            .build()
            .expect("reqwest 0.12 TLS client must be available");
        let dsn = options
            .dsn
            .as_ref()
            .expect("Sentry transport requires a DSN");
        let auth = dsn.to_auth(Some(&options.user_agent)).to_string();
        let url = dsn.envelope_api_url().to_string();
        let (sender, receiver) = mpsc::sync_channel(30);
        let shutdown = Arc::new(AtomicBool::new(false));
        let worker_shutdown = shutdown.clone();

        let handle = std::thread::Builder::new()
            .name("sentry-transport".into())
            .spawn(move || {
                let mut rate_limiter = RateLimiter::new();
                for task in receiver {
                    if worker_shutdown.load(Ordering::SeqCst) {
                        return;
                    }
                    let envelope = match task {
                        Task::Send(envelope) => envelope,
                        Task::Flush(done) => {
                            let _ = done.send(());

View on GitHub (pinned to 7491200858)

Solutions

  1. Provide the Sentry DSN via the standard env/config channel before initializing the transport
  2. Skip Sentry init entirely when no DSN is configured (crash reporting becomes a no-op)
  3. Guard DSN presence at config-load time so the transport is never constructed DSN-less
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/sentry_transport.rs:49 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/f66332e4d069e3c1. Report an issue: GitHub.