---
title: CSSearchQueryError
framework: Core Spotlight
role: symbol
role_heading: Structure
platforms: [iOS 10.0+, iPadOS 10.0+, Mac Catalyst 13.1+, macOS 10.12+, visionOS 1.0+]
path: corespotlight/cssearchqueryerror
---

# CSSearchQueryError

Search query errors returned by Core Spotlight.

## Declaration

```swift
struct CSSearchQueryError
```

## Topics

### Getting the error codes

- [cancelled](corespotlight/cssearchqueryerror/cancelled.md)
- [indexUnreachable](corespotlight/cssearchqueryerror/indexunreachable.md)
- [invalidQuery](corespotlight/cssearchqueryerror/invalidquery.md)
- [unknown](corespotlight/cssearchqueryerror/unknown.md)

### Getting codes for query-related errors

- [CSSearchQueryError.Code](corespotlight/cssearchqueryerror/code.md)

### Getting the error description

- [errorDomain](corespotlight/cssearchqueryerror/errordomain.md)

## Relationships

### Conforms To

- [CustomNSError](foundation/customnserror.md)
- [Equatable](swift/equatable.md)
- [Error](swift/error.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Errors

- [CSIndexError](corespotlight/csindexerror.md)
- [CSIndex Errors](corespotlight/csindex-errors.md)
- [CSSearchQuery Errors](corespotlight/cssearchquery-errors.md)
