mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(gui-client): don't bother user with error details (#8468)
There is no reason to show the chain of errors to the user, we are logging it on ERROR level and will thus be notified via Sentry.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use anyhow::Result;
|
||||
use firezone_headless_client::ipc;
|
||||
|
||||
pub const GENERIC_MSG: &str = "An unexpected error occurred. Please try restarting Firezone. If the issue persists, contact your administrator.";
|
||||
|
||||
// TODO: Replace with `anyhow` gradually per <https://github.com/firezone/firezone/pull/3546#discussion_r1477114789>
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum Error {
|
||||
@@ -34,7 +36,7 @@ impl Error {
|
||||
}
|
||||
Error::IpcClosed => "IPC connection closed".to_string(),
|
||||
Error::IpcRead(_) => "IPC read failure".to_string(),
|
||||
Error::Other(error) => error.to_string(),
|
||||
Error::Other(_) => GENERIC_MSG.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ fn run_gui(cli: Cli) -> Result<()> {
|
||||
return Err(anyhow);
|
||||
}
|
||||
|
||||
common::errors::show_error_dialog(anyhow.to_string())?;
|
||||
common::errors::show_error_dialog(common::errors::GENERIC_MSG.to_owned())?;
|
||||
tracing::error!("GUI failed: {anyhow:#}");
|
||||
|
||||
Err(anyhow)
|
||||
|
||||
Reference in New Issue
Block a user