<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSError/UserInfoKey",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSErrorUserInfoKey"
  },
  "title" : "NSError.UserInfoKey"
}
-->

# NSError.UserInfoKey

These keys may exist in the user info dictionary.

```
typealias UserInfoKey = NSString
```

## Topics

### Constants

[`NSURLErrorKey`](/documentation/Foundation/NSURLErrorKey)

The corresponding value is an `NSURL` object.

[`NSFilePathErrorKey`](/documentation/Foundation/NSFilePathErrorKey)

Contains the file path of the error.

[`NSHelpAnchorErrorKey`](/documentation/Foundation/NSHelpAnchorErrorKey)

The corresponding value is an `NSString` containing the localized help corresponding to the help button. See [`helpAnchor`](/documentation/Foundation/NSError/helpAnchor) for more information.

[`NSLocalizedDescriptionKey`](/documentation/Foundation/NSLocalizedDescriptionKey)

The corresponding value is a localized string representation of the error that, if present, will be returned by [`localizedDescription`](/documentation/Foundation/NSError/localizedDescription).

[`NSLocalizedFailureErrorKey`](/documentation/Foundation/NSLocalizedFailureErrorKey)

[`NSLocalizedFailureReasonErrorKey`](/documentation/Foundation/NSLocalizedFailureReasonErrorKey)

The corresponding value is a localized string representation containing the reason for the failure that, if present, will be returned by [`localizedFailureReason`](/documentation/Foundation/NSError/localizedFailureReason).

[`NSLocalizedRecoveryOptionsErrorKey`](/documentation/Foundation/NSLocalizedRecoveryOptionsErrorKey)

The corresponding value is an array containing the localized titles of buttons appropriate for displaying in an alert panel.

[`NSLocalizedRecoverySuggestionErrorKey`](/documentation/Foundation/NSLocalizedRecoverySuggestionErrorKey)

The corresponding value is a string containing the localized recovery suggestion for the error.

[`NSRecoveryAttempterErrorKey`](/documentation/Foundation/NSRecoveryAttempterErrorKey)

The corresponding value is an object that conforms to the NSErrorRecoveryAttempting informal protocol.

[`NSStringEncodingErrorKey`](/documentation/Foundation/NSStringEncodingErrorKey)

The corresponding value is an `NSNumber` object containing the `NSStringEncoding` value.

[`NSUnderlyingErrorKey`](/documentation/Foundation/NSUnderlyingErrorKey)

The corresponding value is an error that was encountered in an underlying implementation and caused the error that the receiver represents to occur.

[`NSDebugDescriptionErrorKey`](/documentation/Foundation/NSDebugDescriptionErrorKey)

[`NSMultipleUnderlyingErrorsKey`](/documentation/Foundation/NSMultipleUnderlyingErrorsKey)



---

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)