Return correct error message for failed feed adds. Fixes #2759

This commit is contained in:
Maurice Parker 2021-01-24 12:59:42 -06:00
parent 38640b9245
commit 50ebfbe51c
2 changed files with 1 additions and 6 deletions

View File

@ -353,10 +353,6 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
switch subResult {
case .created(let subscription):
self.createFeed(account: account, subscription: subscription, name: name, container: container, completion: completion)
case .alreadySubscribed:
DispatchQueue.main.async {
completion(.failure(AccountError.createErrorAlreadySubscribed))
}
case .notFound:
DispatchQueue.main.async {
completion(.failure(AccountError.createErrorNotFound))

View File

@ -12,7 +12,6 @@ import Secrets
enum CreateReaderAPISubscriptionResult {
case created(ReaderAPISubscription)
case alreadySubscribed
case notFound
}
@ -375,7 +374,7 @@ final class ReaderAPICaller: NSObject {
switch subResult?.numResults {
case 0:
completion(.success(.alreadySubscribed))
completion(.success(.notFound))
default:
guard let streamId = subResult?.streamId else {
completion(.failure(AccountError.createErrorNotFound))