mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
refactor(apple): Downgrade noIPCData to warning for logs (#7813)
If the system extension has not been enabled by the user, opening the `Settings -> Diagnostic Logs` pane will trigger this error. There's nothing we can do until they enable the system extension, so don't capture this particular case in Sentry.
This commit is contained in:
@@ -92,7 +92,13 @@ public final class SettingsViewModel: ObservableObject {
|
||||
return byteCountFormatter.string(fromByteCount: Int64(totalSize))
|
||||
|
||||
} catch {
|
||||
Log.error(error)
|
||||
if let error = error as? VPNConfigurationManagerError,
|
||||
case VPNConfigurationManagerError.noIPCData = error {
|
||||
// Will happen if the extension is not enabled
|
||||
Log.warning("\(#function): Unable to count logs: \(error). Is the XPC service running?")
|
||||
} else {
|
||||
Log.error(error)
|
||||
}
|
||||
|
||||
return "Unknown"
|
||||
}
|
||||
@@ -616,7 +622,12 @@ public struct SettingsView: View {
|
||||
window.contentViewController?.presentingViewController?.dismiss(self)
|
||||
}
|
||||
} catch {
|
||||
Log.error(error)
|
||||
if let error = error as? VPNConfigurationManagerError,
|
||||
case VPNConfigurationManagerError.noIPCData = error {
|
||||
Log.warning("\(#function): Error exporting logs: \(error). Is the XPC service running?")
|
||||
} else {
|
||||
Log.error(error)
|
||||
}
|
||||
|
||||
let alert = await NSAlert()
|
||||
await MainActor.run {
|
||||
|
||||
Reference in New Issue
Block a user