CKQueryOperation not returning error when device offline
<p>I am trying to use <code>CKQueryOperation</code>, rather then <code>performQuery</code> on my CloudKit database.</p>

<p>Both work, but when using a CKQueryOperation I am not getting an error when the device is offline, but I do when using <code>performQuery</code></p>

<p>Here is the bare bones my <code>performQuery</code> example, database is my <code>CKDatabase</code></p>

<pre><code>database.performQuery(q, inZoneWithID: nil) { (records:[CKRecord]?, error:NSError?) in
    if error != nil {
        print(error!.localizedDescription)
        return
    }
}
</code></pre>

<p>An error is given when the device is offline, allowing me to prompt the user. The error is </p>

<p><strong><code>The internet connection appears to be offline</code></strong></p>

<p>However, I get no errors when I use a <code>CKQueryOperation</code></p>

<pre><code>let p = NSPredicate(format:"recordID IN %@", student.courses)
let q = CKQuery(recordType: String(Course), predicate: p)

let queryOperation = CKQueryOperation(query: q)

queryOperation.recordFetchedBlock = { record in
    // not called without network connection - doesn't enter scope
    print(record)
}


queryOperation.queryCompletionBlock = { (cursor: CKQueryCursor?, error: NSError?) in
    // not called without network connection - doesn't enter scope
    print(cursor)
    print(error)
}

database.addOperation(queryOperation)
</code></pre>

<p>With a connection I receive my data for both methods so it is working as expected.</p>

<p>How / Where am I informed of error when using <code>CKQueryOperation</code> ?</p>

<p>Thanks</p>