fix(rust): don't log and return DisconnectErrors (#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.
This commit is contained in:
Thomas Eizinger
2024-12-01 20:22:29 +00:00
committed by GitHub
parent 5f4816ee46
commit e833cb4f30

View File

@@ -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(),