{"record":{"id":"f66332e4d069e3c1","repo":"tinyhumansai/openhuman","slug":"sentry-transport-requires-a-dsn","errorCode":null,"errorMessage":"Sentry transport requires a DSN","messagePattern":"Sentry transport requires a DSN","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/sentry_transport.rs","lineNumber":49,"sourceCode":"        if let Some(url) = options.http_proxy.as_ref() {\n            match reqwest::Proxy::http(url.as_ref()) {\n                Ok(proxy) => builder = builder.proxy(proxy),\n                Err(error) => sentry_debug!(\"invalid HTTP proxy: {error:?}\"),\n            }\n        }\n        if let Some(url) = options.https_proxy.as_ref() {\n            match reqwest::Proxy::https(url.as_ref()) {\n                Ok(proxy) => builder = builder.proxy(proxy),\n                Err(error) => sentry_debug!(\"invalid HTTPS proxy: {error:?}\"),\n            }\n        }\n        let client = builder\n            .build()\n            .expect(\"reqwest 0.12 TLS client must be available\");\n        let dsn = options\n            .dsn\n            .as_ref()\n            .expect(\"Sentry transport requires a DSN\");\n        let auth = dsn.to_auth(Some(&options.user_agent)).to_string();\n        let url = dsn.envelope_api_url().to_string();\n        let (sender, receiver) = mpsc::sync_channel(30);\n        let shutdown = Arc::new(AtomicBool::new(false));\n        let worker_shutdown = shutdown.clone();\n\n        let handle = std::thread::Builder::new()\n            .name(\"sentry-transport\".into())\n            .spawn(move || {\n                let mut rate_limiter = RateLimiter::new();\n                for task in receiver {\n                    if worker_shutdown.load(Ordering::SeqCst) {\n                        return;\n                    }\n                    let envelope = match task {\n                        Task::Send(envelope) => envelope,\n                        Task::Flush(done) => {\n                            let _ = done.send(());","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/sentry_transport.rs#L31-L67","documentation":"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.","triggerScenarios":"Thrown at src/core/sentry_transport.rs:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the Sentry DSN via the standard env/config channel before initializing the transport","Skip Sentry init entirely when no DSN is configured (crash reporting becomes a no-op)","Guard DSN presence at config-load time so the transport is never constructed DSN-less"],"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-14T05:17:10.506Z"}