---
title: error
framework: watchkit
role: symbol
role_heading: Instance Property
path: watchkit/wkaudiofileplayer/error
---

# error

An error that describes the cause of a failure.

## Declaration

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

## Discussion

Discussion This property is nil unless the status property of the player item is WKAudioFilePlayerStatus.failed. When playback fails, the error indicates the reason for the failure.

## See Also

### Getting Information About the Player

- [currentItem](watchkit/wkaudiofileplayer/currentitem.md)
- [status](watchkit/wkaudiofileplayer/status.md)
