mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
chore(connlib): print error after panicking (#5854)
This commit is contained in:
@@ -172,16 +172,18 @@ where
|
||||
}
|
||||
Err(e) => match e.try_into_panic() {
|
||||
Ok(panic) => {
|
||||
tracing::error!("connlib panicked");
|
||||
if let Some(msg) = panic.downcast_ref::<&str>() {
|
||||
tracing::error!("connlib panicked: {msg}");
|
||||
callbacks.on_disconnect(&Error::Panic(msg.to_string()));
|
||||
return;
|
||||
}
|
||||
if let Some(msg) = panic.downcast_ref::<String>() {
|
||||
tracing::error!("connlib panicked: {msg}");
|
||||
callbacks.on_disconnect(&Error::Panic(msg.to_string()));
|
||||
return;
|
||||
}
|
||||
|
||||
tracing::error!("connlib panicked with a non-string payload");
|
||||
callbacks.on_disconnect(&Error::PanicNonStringPayload);
|
||||
}
|
||||
Err(_) => {
|
||||
|
||||
Reference in New Issue
Block a user