---
title: HKError.Code.errorNoData
framework: healthkit
role: symbol
role_heading: Case
path: healthkit/hkerror/code/errornodata
---

# HKError.Code.errorNoData

Data is unavailable for the requested query and predicate.

## Declaration

```swift
case errorNoData
```

## Discussion

Discussion This error indicates that no data exists that corresponds to a particular query, so the system can’t calculate the query’s result. HKStatisticsQuery queries return this error when HealthKit can’t return the data needed to calculate the statistics.

## See Also

### Errors

- [HKError.Code.errorHealthDataUnavailable](healthkit/hkerror/code/errorhealthdataunavailable.md)
- [HKError.Code.errorHealthDataRestricted](healthkit/hkerror/code/errorhealthdatarestricted.md)
- [HKError.Code.errorInvalidArgument](healthkit/hkerror/code/errorinvalidargument.md)
- [HKError.Code.errorAuthorizationDenied](healthkit/hkerror/code/errorauthorizationdenied.md)
- [HKError.Code.errorAuthorizationNotDetermined](healthkit/hkerror/code/errorauthorizationnotdetermined.md)
- [HKError.Code.errorRequiredAuthorizationDenied](healthkit/hkerror/code/errorrequiredauthorizationdenied.md)
- [HKError.Code.errorDatabaseInaccessible](healthkit/hkerror/code/errordatabaseinaccessible.md)
- [HKError.Code.errorUserCanceled](healthkit/hkerror/code/errorusercanceled.md)
- [HKError.Code.errorAnotherWorkoutSessionStarted](healthkit/hkerror/code/erroranotherworkoutsessionstarted.md)
- [HKError.Code.errorUserExitedWorkoutSession](healthkit/hkerror/code/erroruserexitedworkoutsession.md)
