From 81e9ccfa05d801c8e5309ade3bd796e36fa38412 Mon Sep 17 00:00:00 2001 From: VallierDev <24893073+VallierDev@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:34:34 +0800 Subject: [PATCH] fix(signaling): log the sanitized reason when signaling fails to connect The WebSocket transport already reduces errors to a category or HTTP status without the token or endpoint, so log it instead of 'details omitted' to tell a refused upgrade from a network failure (#166). Co-Authored-By: Claude Opus 5.5 --- src/main.rs | 4 ++-- src/signaling.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7c3908e..d70d2c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -855,8 +855,8 @@ async fn serve(mut capture: Arc, input: Arc, shutd Arc::new(cli) } Err(e) => { - let _ = e; - log::error!("Failed to connect signaling; retrying in 5s (details omitted)"); + // ws_transport errors carry only a category or HTTP status, never the token or URL. + log::error!("Failed to connect signaling; retrying in 5s: {e}"); tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; continue; } diff --git a/src/signaling.rs b/src/signaling.rs index 17f56ee..d6d94e1 100644 --- a/src/signaling.rs +++ b/src/signaling.rs @@ -248,7 +248,7 @@ impl SignalingClient { let mut req = ws_url .clone() .into_client_request() - .map_err(|e| format!("Invalid WS request: {}", e))?; + .map_err(|_| "Invalid WS request".to_string())?; req.headers_mut().insert( "X-NRD-AUTH",