<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHAssetResourceUploadJob/error",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHAssetResourceUploadJob(py)error"
  },
  "title" : "error"
}
-->

# error

The error that caused the job to fail.

```
var error: (any Error)? { get }
```

## Return Value

An error object describing the failure, or `nil` if the job has not failed.

## Discussion

This property is populated when the job reaches the `PHAssetResourceUploadJobStateFailed` state.
It provides detailed information about why the upload failed, including network errors,
server errors, or client-side errors.

> Note: The error provided is sanitized and may not be the actual error returned from URLResponse.

---

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)