From 4aa00332708a2041689a77090676932987c49fd0 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 7 May 2020 15:09:26 -0500 Subject: [PATCH] Correct Feed Provider feed creation error handling --- .../Account/CloudKit/CloudKitAccountDelegate.swift | 4 ++-- .../Account/LocalAccount/LocalAccountDelegate.swift | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift index 59f2ddd2e..3ae9cb834 100644 --- a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift @@ -632,9 +632,9 @@ private extension CloudKitAccountDelegate { } } - case .failure(let error): + case .failure: self.refreshProgress.clear() - completion(.failure(error)) + completion(.failure(AccountError.createErrorNotFound)) } } } diff --git a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift index 7d2fb57f6..d82d3d9e6 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift @@ -272,13 +272,15 @@ private extension LocalAccountDelegate { account.update(urlString, with: parsedItems) { _ in completion(.success(feed)) } - case .failure: - completion(.failure(AccountError.createErrorNotFound)) + case .failure(let error): + self.refreshProgress.clear() + completion(.failure(error)) } } - case .failure(let error): - completion(.failure(error)) + case .failure: + self.refreshProgress.clear() + completion(.failure(AccountError.createErrorNotFound)) } } }