<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMActionErrorKey",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:@macro@AMActionErrorKey"
  },
  "title" : "AMActionErrorKey"
}
-->

# AMActionErrorKey

A key to retrieve the action that caused an error.

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

## Discussion

Use this key to obtain, from the <doc://com.apple.documentation/documentation/Foundation/NSError/userInfo> dictionary of an instance of <doc://com.apple.documentation/documentation/Foundation/NSError>, a reference to the action ([`AMAction`](/documentation/Automator/AMAction)) that caused the error.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)