---
title: AMActionErrorKey
framework: Automator
role: symbol
role_heading: Global Variable
platforms: [Mac Catalyst 14.0+, macOS 10.4+]
path: automator/amactionerrorkey
---

# AMActionErrorKey

A key to retrieve the action that caused an error.

## Declaration

```swift
var AMActionErrorKey: String { get }
```

## Discussion

Discussion Use this key to obtain, from the userInfo dictionary of an instance of NSError, a reference to the action (AMAction) that caused the error.

## See Also

### Errors

- [AMAutomatorErrorDomain](automator/amautomatorerrordomain.md)
- [AMError](automator/amerror.md)
- [AMError.Code](automator/amerror/code.md)
