mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 17:12:23 +01:00
Show correct error for already subscribed error.
This commit is contained in:
parent
86edb9aa33
commit
4ad3da30e1
@ -333,7 +333,7 @@ final class ReaderAPICaller: NSObject {
|
||||
|
||||
let postData = "T=\(token)&ac=subscribe&s=feed/\(feedURL.absoluteString)&a=user/-/label/\(folder.nameForDisplay)&t=\(name ?? "")".data(using: String.Encoding.utf8)
|
||||
|
||||
self.self.transport.send(request: request, method: HTTPMethod.post, payload: postData!, completion: { (result) in
|
||||
self.transport.send(request: request, method: HTTPMethod.post, payload: postData!, completion: { (result) in
|
||||
switch result {
|
||||
case .success:
|
||||
|
||||
@ -356,17 +356,16 @@ final class ReaderAPICaller: NSObject {
|
||||
|
||||
completion(.success(.created(subscription)))
|
||||
|
||||
case .failure:
|
||||
completion(.failure(AccountError.createErrorAlreadySubscribed))
|
||||
case .failure(let error):
|
||||
completion(.failure(error))
|
||||
}
|
||||
})
|
||||
|
||||
case .failure(let error):
|
||||
completion(.failure(error))
|
||||
case .failure:
|
||||
completion(.failure(AccountError.createErrorAlreadySubscribed))
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
case .failure(let error):
|
||||
completion(.failure(error))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user