<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/url-loading-system-error-info-keys",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "URL Loading System error info keys"
}
-->

# URL Loading System error info keys

Recognize these keys from the user info dictionary of error objects produced by URL Loading APIs.

## Discussion

These keys are only present in the [`NSURLErrorDomain`](/documentation/Foundation/NSURLErrorDomain).

## Topics

### Keys

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

The URL which caused a load to fail.

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

The state of a failed SSL handshake.

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

The URL which caused a load to fail.

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

A key in the error dictionary that provides the reason for canceling a background task.

[URL Session Background Task Cancellation Reasons](/documentation/Foundation/url-session-background-task-cancellation-reasons)

Reasons that indicate why the system canceled a background task.

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

The reason the network was unavailable for a task.

[`NetworkUnavailableReason`](/documentation/Foundation/URLError/NetworkUnavailableReason-swift.enum)

An enumeration of reasons explaining why a task couldn’t satisfy networking constraints.

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

An enumeration of reasons why a task couldn’t satisfy networking constraints.

### Deprecated

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

The URL 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)