<!--
{
  "availability" : [
    "watchOS: 2.0.0 - 6.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKAudioFilePlayer/error",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKAudioFilePlayer(py)error"
  },
  "title" : "error"
}
-->

# error

An error that describes the cause of a failure.

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

## Discussion

This property is `nil` unless the [`status`](/documentation/WatchKit/WKAudioFilePlayer/status) property of the player item is [`WKAudioFilePlayerStatus.failed`](/documentation/WatchKit/WKAudioFilePlayerStatus/failed). When playback fails, the error indicates the reason for the failure.

---

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)