1

Here's a snippet of code in which I'm modifying some records on a user's private CloudKit DB.

 let op = CKModifyRecordsOperation(recordsToSave: recordsToModify, recordIDsToDelete: []) op.savePolicy = CKRecordSavePolicy.ChangedKeys op.modifyRecordsCompletionBlock = { saved, deleted, err in println("modified all ... \(saved.count) w err '\(err)' \(err != nil ? err.userInfo : [:])") } self.privateDB.addOperation(op) 

Νοrmally this works great:

 modified all ... 284 w err 'nil' Optional([:]) 

But every now and then I get the following output:

 modified all ... 0 w err '<CKError 0x7f9210e92840:"Zone Busy" (23/2029); "Zone busy">' Optional([NSDebugDescription: CKInternalErrorDomain: 2029, NSLocalizedDescription: Zone busy, NSUnderlyingError: <CKError 0x7f9210ea7dd0: "Unknown Error" (2029)>]) 

I'm assuming this is a hiccup of some sort on CloudKit's side of things - but how do I detect this? How should I handle it?

1 Answer 1

6

This error signifies your request is fine, but the Cloud server is overloaded handling requests. You are supposed to wait and try the operation again after some time. This is also mentioned towards the end of WWDC 2014 video 231 - Advanced CloudKit.

Some additional info can be found here: CloudKit Framework Constants Reference

Sign up to request clarification or add additional context in comments.

2 Comments

I will occasionally get a Zone Busy error. But it -seems- like the transaction is still going through without me having to retry it! Does anyone know if this is possible?
@GregMaletic make sure you are sending only one transaction. You are probably sending multiple transactions at the same time. This explains why it's getting through the first time and you're getting the error the second time.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.