---
title: "needsValueError(_:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/intentparametercontext/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
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.
