<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASExtensionLocalizedFailureReasonErrorKey",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:@ASExtensionLocalizedFailureReasonErrorKey"
  },
  "title" : "ASExtensionLocalizedFailureReasonErrorKey"
}
-->

# ASExtensionLocalizedFailureReasonErrorKey

A key that specifies a string value to show to the user when a request fails.

```
let ASExtensionLocalizedFailureReasonErrorKey: String
```

## Discussion

When canceling a request, your extension calls [`cancelRequest(withError:)`](/documentation/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext/cancelRequest(withError:)). The system informs the user that the request failed. To show additional information regarding the failure, use this key to set a string value in the error’s `userInfo` dictionary.

---

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)