mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(rust/gui-client): log connlib connection errors (#6574)
Old behavior: Connection errors are sent to the GUI but the IPC service forgets about them. New behavior: Clone the error and log it on both sides. Found while debugging a customer issue. This would have made the logs easier to read.
This commit is contained in:
@@ -426,8 +426,12 @@ impl<'a> Handler<'a> {
|
||||
.context("Error while sending IPC message")?
|
||||
}
|
||||
ClientMsg::Connect { api_url, token } => {
|
||||
// Warning: Connection errors don't bubble to callers of `handle_ipc_msg`.
|
||||
let token = secrecy::SecretString::from(token);
|
||||
let result = self.connect_to_firezone(&api_url, token);
|
||||
if let Err(error) = &result {
|
||||
tracing::error!(?error, "Failed to connect connlib session");
|
||||
}
|
||||
self.ipc_tx
|
||||
.send(&ServerMsg::ConnectResult(result))
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user