---
title: SRError.Code.promptDeclined
framework: sensorkit
role: symbol
role_heading: Case
path: sensorkit/srerror/code/promptdeclined
---

# SRError.Code.promptDeclined

Occurs when the user cancels the sensor approval workflow.

## Declaration

```swift
case promptDeclined
```

## Discussion

Discussion The requestAuthorization(sensors:completion:) passes this error into the completion closure if the user declines the prompt by pressing Cancel. The framework also cancels the prompt if you call this function after the user had already responded to the prompt either by approving or denying access to the argument sensors.

## See Also

### Errors

- [SRError.Code.dataInaccessible](sensorkit/srerror/code/datainaccessible.md)
- [SRError.Code.fetchRequestInvalid](sensorkit/srerror/code/fetchrequestinvalid.md)
- [SRError.Code.invalidEntitlement](sensorkit/srerror/code/invalidentitlement.md)
- [SRError.Code.noAuthorization](sensorkit/srerror/code/noauthorization.md)
