From e833cb4f308a6f98cbea44e58955f98e5ff1f51f Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Sun, 1 Dec 2024 20:22:29 +0000 Subject: [PATCH] fix(rust): don't log and return `DisconnectError`s (#7416) These will be handled by whoever sits on the other side of the channel. Logging these here as well causes duplicate logs and error reports to Sentry. --- rust/headless-client/src/lib.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rust/headless-client/src/lib.rs b/rust/headless-client/src/lib.rs index 6d2939e93..ecd90096f 100644 --- a/rust/headless-client/src/lib.rs +++ b/rust/headless-client/src/lib.rs @@ -14,7 +14,6 @@ use anyhow::{Context as _, Result}; use connlib_client_shared::Callbacks; use connlib_model::ResourceView; use firezone_bin_shared::platform::DnsControlMethod; -use firezone_logging::std_dyn_err; use std::{ net::{IpAddr, Ipv4Addr, Ipv6Addr}, path::PathBuf, @@ -98,12 +97,6 @@ pub struct CallbackHandler { impl Callbacks for CallbackHandler { fn on_disconnect(&self, error: &connlib_client_shared::DisconnectError) { - if error.is_authentication_error() { - tracing::warn!(error = std_dyn_err(error)); - } else { - tracing::error!(error = std_dyn_err(error)) - } - self.cb_tx .try_send(ConnlibMsg::OnDisconnect { error_msg: error.to_string(),