---
title: "needsValueError(_:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/intentparameter/needsvalueerror(_:)"
---

# needsValueError(_:)

Returns a restartPerform error with context to request a value from the user for this parameter and re-perform the intent with the new value.

## Declaration

```swift
final func needsValueError(_ dialog: IntentDialog? = nil) -> AppIntentError
```

## Parameters

- `dialog`: A custom dialog that may be used when prompting the user for the value

## Return Value

Return Value An error that should be thrown within the intent perform() method.

## See Also

### Requesting a value

- [requestValue(_:)](appintents/intentparameter/requestvalue(_:)-592nd.md)
