<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerLooper/error",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerLooper(py)error"
  },
  "title" : "error"
}
-->

# error

An error that describes the reason looping failed.

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

## Discussion

The value of this property is `nil` unless the looper’s [`status`](/documentation/AVFoundation/AVPlayerLooper/status-swift.property) changes to [`AVPlayerLooper.Status.failed`](/documentation/AVFoundation/AVPlayerLooper/Status-swift.enum/failed). If this occurs, this property value contains an error object that provides the details of the error that prevented looping.

---

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)