I'm repeatedly getting this error on one - but not all - CKQuery operation:
CKError(_nsError: <CKError 0x608000846ff0: "Service Unavailable" (6/2022); "Request failed with http status code 503">)
There's no further useful info in the UserInfo dictionary, including no value for the CKErrorRetryAfterKey.
My code initially queries CloudKit for basically two fields: "name" and "hash". Hash is a hash value for a CKAsset file (on the same record) that I don't want to download unless the hash code indicates that the file has changed.
For all the records whose hash codes indicate that I should download the CKAsset, I prepare the same query in the same code, but add the "json" field and rerun, to download only the json files that I need. I use this predicate, containing an array of the desired CKReferences
NSPredicate.init(format: "recordID in %@", fullRecordsToDownload)
The first query always works, the second always fails with the 503. Every time I repeat, it's the same pattern.
Thus it can't really be that the service is unavailable, right?
How can I diagnose this?