<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchQueryError/Code/cancelled",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Core Spotlight"
    ],
    "preciseIdentifier" : "c:@E@CSSearchQueryErrorCode@CSSearchQueryErrorCodeCancelled"
  },
  "title" : "CSSearchQueryError.Code.cancelled"
}
-->

# CSSearchQueryError.Code.cancelled

The query stopped because someone canceled it.

```
case cancelled
```

## Discussion

The system reports this error if your code called the [`cancel()`](/documentation/CoreSpotlight/CSUserQuery/cancel()) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)