diff --git a/AltStore/LaunchViewController.swift b/AltStore/LaunchViewController.swift index 4685f0fd..13c42c80 100644 --- a/AltStore/LaunchViewController.swift +++ b/AltStore/LaunchViewController.swift @@ -313,6 +313,9 @@ extension LaunchViewController guard case .failure(let error) = result else { return } Logger.main.error("Failed to update sources on launch. \(error.localizedDescription, privacy: .public)") + let errorDesc = ErrorProcessing(.fullError).getDescription(error: error as NSError) + print("Failed to update sources on launch. \(errorDesc)") + let toastView = ToastView(error: error) toastView.addTarget(self.destinationViewController, action: #selector(TabBarController.presentSources), for: .touchUpInside) toastView.show(in: self.destinationViewController.selectedViewController ?? self.destinationViewController) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index 49a4e672..39fc0c47 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -626,6 +626,11 @@ extension AppManager self.fetchSources() { (result) in do { + // Check if the result is failure and rethrow + if case .failure(let error) = result { + throw error // Rethrow the error + } + do { let (_, context) = try result.get()