---
title: promptDeclined
framework: sensorkit
role: symbol
role_heading: Type Property
path: sensorkit/srerror/promptdeclined
---

# promptDeclined

Occurs when the user cancels the sensor approval workflow.

## Declaration

```swift
static var promptDeclined: SRError.Code { get }
```

## 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

### Identifying an Error Cause

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