Return correct error message for failed feed adds. Fixes #2759
This commit is contained in:
parent
38640b9245
commit
50ebfbe51c
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue