---
title: "needsDisambiguationError(among:dialog:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/intentparameter/needsdisambiguationerror(among:dialog:)"
---

# needsDisambiguationError(among:dialog:)

Returns a restartPerform error with context for the user to disambiguate amongst an array of values from for this parameter and re-perform the intent with the new value.

## Declaration

```swift
final func needsDisambiguationError(among itemsToDisambiguate: [Value.ValueType], dialog: IntentDialog? = nil) -> AppIntentError
```

## Parameters

- `itemsToDisambiguate`: The list of items to be presented to the user for disambiguation
- `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 disambiguation

- [requestDisambiguation(among:dialog:)](appintents/intentparameter/requestdisambiguation(among:dialog:).md)
