---
title: AppIntentError
framework: appintents
role: symbol
role_heading: Structure
path: appintents/appintenterror
---

# AppIntentError

An error that indicates a problem occurred while performing an app intent.

## Declaration

```swift
struct AppIntentError
```

## Overview

Overview When your app intent encounters an error during execution, throw an AppIntentError to communicate structured failure information to the system. Apple Intelligence, Siri, and Shortcuts use this information to determine the appropriate response — such as prompting a person, retrying the operation, or reporting the failure. You can create an AppIntentError in several ways: The recommended approach for most apps is to define an error enumeration that conforms to CustomLocalizedStringResourceConvertible` and throw it from your intent's AppIntent/perform()`` method. The framework automatically wraps conforming errors into an AppIntentError with the localized description you provide.

## Topics

### Getting the error codes

- [restartPerform](appintents/appintenterror/restartperform.md)

### Initializers

- [init(description:)](appintents/appintenterror/init(description:).md)
- [init(predefinedError:description:)](appintents/appintenterror/init(predefinederror:description:).md)
- [init(wrapping:)](appintents/appintenterror/init(wrapping:)-2lmed.md)
- [init(wrapping:)](appintents/appintenterror/init(wrapping:)-4967l.md)

### Enumerations

- [AppIntentError.PermissionRequired](appintents/appintenterror/permissionrequired.md)
- [AppIntentError.Unrecoverable](appintents/appintenterror/unrecoverable.md)
- [AppIntentError.UserActionRequired](appintents/appintenterror/useractionrequired.md)

### Default Implementations

- [CustomLocalizedStringResourceConvertible Implementations](appintents/appintenterror/customlocalizedstringresourceconvertible-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomLocalizedStringResourceConvertible](foundation/customlocalizedstringresourceconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Error](swift/error.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Errors

- [CustomAppIntentErrorConvertible](appintents/customappintenterrorconvertible.md)
