From 311f5b2e81571eee0fc34c09ee07cc1378254cee Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Wed, 18 Dec 2019 09:19:00 +1100 Subject: [PATCH] Check the account update error when update a Feedly account and finish with an error, indicating to its delegate that remaining operations should cancel. --- .../FeedlyUpdateAccountFeedsWithItemsOperation.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/Feedly/Operations/FeedlyUpdateAccountFeedsWithItemsOperation.swift b/Frameworks/Account/Feedly/Operations/FeedlyUpdateAccountFeedsWithItemsOperation.swift index a9465d349..b9820981e 100644 --- a/Frameworks/Account/Feedly/Operations/FeedlyUpdateAccountFeedsWithItemsOperation.swift +++ b/Frameworks/Account/Feedly/Operations/FeedlyUpdateAccountFeedsWithItemsOperation.swift @@ -31,7 +31,12 @@ final class FeedlyUpdateAccountFeedsWithItemsOperation: FeedlyOperation { let webFeedIDsAndItems = organisedItemsProvider.parsedItemsKeyedByFeedId - account.update(webFeedIDsAndItems: webFeedIDsAndItems, defaultRead: true) { _ in + account.update(webFeedIDsAndItems: webFeedIDsAndItems, defaultRead: true) { databaseError in + if let error = databaseError { + self.didFinish(error) + return + } + os_log(.debug, log: self.log, "Updated %i feeds for \"%@\"", webFeedIDsAndItems.count, self.organisedItemsProvider.providerName) self.didFinish() }