title: Handling CloudKit errors and CKError
body: <p>This seems elemental  but I can't seem to find anyway that leads me in the correct direction.</p>
  
  <p>In my app I have this code to access a CloudKit record:</p>
  
  <pre><code>db.performQuery(query, inZoneWithID: nil) {(results, error) -&gt; Void in
  if error != nil {
      print("performQuery error on query:\n\(error?.description)")
          }
      else {
          for rec in results! {
               // handle the record
          }
      }
   }
  </code></pre>
  
  <p>This works, but sometimes I get an error; for example:</p>
  
  <pre><code>&lt;CKError 0x155cfaa0: \"Request Rate Limited\" (7/2008); Retry after 1.9 seconds&gt;
  </code></pre>
  
  <p>I understand why I get the error, but I do not know how to access the CKError object which has the information I need to wait and retry the operation after - in this case - 1.9 seconds (or whatever has been shown in the message). "error" in the closure is an NSError.</p>
  
  <p>How do I access the CKError record and retrieve the CkErrorCode and retryAfter properties of that so I can gracefully handle the retry?</p>
  
  <p>Sorry if this seems elemental, but I sure have not found anything that explains it.</p>