---
title: MPError.Code
framework: Media Player
role: symbol
role_heading: Enumeration
platforms: [iOS 9.3+, iPadOS 9.3+, Mac Catalyst 13.1+, macOS 10.14.2+, tvOS 9.0+, visionOS 1.0+, watchOS 5.0+]
path: mediaplayer/mperror/code
---

# MPError.Code

An enumeration that represents error codes for framework operations.

## Declaration

```swift
enum Code
```

## Topics

### Error codes

- [MPError.Code.cancelled](mediaplayer/mperror/code/cancelled.md)
- [MPError.Code.cloudServiceCapabilityMissing](mediaplayer/mperror/code/cloudservicecapabilitymissing.md)
- [MPError.Code.networkConnectionFailed](mediaplayer/mperror/code/networkconnectionfailed.md)
- [MPError.Code.notFound](mediaplayer/mperror/code/notfound.md)
- [MPError.Code.notSupported](mediaplayer/mperror/code/notsupported.md)
- [MPError.Code.permissionDenied](mediaplayer/mperror/code/permissiondenied.md)
- [MPError.Code.requestTimedOut](mediaplayer/mperror/code/requesttimedout.md)
- [MPError.Code.unknown](mediaplayer/mperror/code/unknown.md)

### Initializers

- [init(rawValue:)](mediaplayer/mperror/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Inspecting an error

- [errorDomain](mediaplayer/mperror/errordomain.md)
- [MPErrorDomain](mediaplayer/mperrordomain.md)
- [Error constants](mediaplayer/error-constants.md)
