Add user deleted zone checks.

This commit is contained in:
Maurice Parker 2020-04-03 20:39:50 -05:00
parent fc020c06e8
commit 4d3e9b068f
1 changed files with 8 additions and 0 deletions

View File

@ -139,6 +139,10 @@ extension CloudKitZone {
self?.retryIfPossible(after: timeToWait) {
self?.query(query, completion: completion)
}
case .userDeletedZone:
DispatchQueue.main.async {
completion(.failure(CloudKitZoneError.userDeletedZone))
}
default:
DispatchQueue.main.async {
completion(.failure(error!))
@ -170,6 +174,10 @@ extension CloudKitZone {
self?.retryIfPossible(after: timeToWait) {
self?.fetch(externalID: externalID, completion: completion)
}
case .userDeletedZone:
DispatchQueue.main.async {
completion(.failure(CloudKitZoneError.userDeletedZone))
}
default:
DispatchQueue.main.async {
completion(.failure(error!))