From 7e791a2e7dfc1fcd5a436c08f9324390f9736d38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiel=20Gillard=20=F0=9F=A4=AA?= Date: Tue, 23 Mar 2021 17:00:54 +1100 Subject: [PATCH] Feedly API is no longer returning the feed values for deleted feeds, so make the response (which we ignore anyway), optional. Fixes #2897 --- Account/Sources/Account/Feedly/FeedlyAPICaller.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Account/Sources/Account/Feedly/FeedlyAPICaller.swift b/Account/Sources/Account/Feedly/FeedlyAPICaller.swift index 36f974835..f855a95e0 100644 --- a/Account/Sources/Account/Feedly/FeedlyAPICaller.swift +++ b/Account/Sources/Account/Feedly/FeedlyAPICaller.swift @@ -369,7 +369,9 @@ final class FeedlyAPICaller { } } - send(request: request, resultType: [FeedlyFeed].self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in + // `resultType` is optional because the Feedly API has gone from returning an array of removed feeds to returning `null`. + // https://developer.feedly.com/v3/collections/#remove-multiple-feeds-from-a-personal-collection + send(request: request, resultType: Optional<[FeedlyFeed]>.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in switch result { case .success((let httpResponse, _)): if httpResponse.statusCode == 200 {