<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SensorKit",
  "identifier" : "/documentation/SensorKit/SRError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SensorKit"
    ],
    "preciseIdentifier" : "s:SC11SRErrorCodeLeV"
  },
  "title" : "SRError"
}
-->

# SRError

An error that SensorKit reports.

```
struct SRError
```

## Topics

### Inspecting Error Information

[`static var errorDomain: String`](/documentation/SensorKit/SRError/errorDomain)

### Identifying an Error Cause

[`static var promptDeclined: SRError.Code`](/documentation/SensorKit/SRError/promptDeclined)

Occurs when the user cancels the sensor approval workflow.

[`static var dataInaccessible: SRError.Code`](/documentation/SensorKit/SRError/dataInaccessible)

Occurs when the app can’t access the sensor’s data.

[`static var fetchRequestInvalid: SRError.Code`](/documentation/SensorKit/SRError/fetchRequestInvalid)

Occurs when the app misconfigures a fetch request.

[`static var invalidEntitlement: SRError.Code`](/documentation/SensorKit/SRError/invalidEntitlement)

Occurs when the app lacks the required entitlement.

[`static var noAuthorization: SRError.Code`](/documentation/SensorKit/SRError/noAuthorization)

Occurs when the user declines sensor access in the Settings app.

## Relationships

### Conforms To

[`Error`](/documentation/Swift/Error)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomNSError`](/documentation/Foundation/CustomNSError)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)