mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-23 07:39:59 +01:00
Capture 401 http status codes as already subscribed error when creating a Feedbin subscription
This commit is contained in:
parent
fd8a973084
commit
5200e49175
@ -172,9 +172,14 @@ final class FeedbinAPICaller: NSObject {
|
|||||||
|
|
||||||
switch error {
|
switch error {
|
||||||
case TransportError.httpError(let status):
|
case TransportError.httpError(let status):
|
||||||
if status == 404 {
|
switch status {
|
||||||
|
case 401:
|
||||||
|
// I don't know why we get 401's here. This looks like a Feedbin bug, but it only happens
|
||||||
|
// when you are already subscribed to the feed.
|
||||||
|
completion(.success(.alreadySubscribed))
|
||||||
|
case 404:
|
||||||
completion(.success(.notFound))
|
completion(.success(.notFound))
|
||||||
} else {
|
default:
|
||||||
completion(.failure(error))
|
completion(.failure(error))
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user