One Logo Pool Ball
MusicKit · IOS API REFERENCE

MusicDataRequest.Error

struct · iOS 15.0+ · SDK 27.1

struct Error

An error that the Apple Music API returns.

Members (8)

get · iOS 15.0+

detailText

TypeScript
get detailText(): string
Swift declaration
let detailText: String

Additional detailed information about the cause of the error. This is to help identify possible resolutions.

get · iOS 15.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 15.0+

originalResponse

TypeScript
get originalResponse(): MusicDataResponse
Swift declaration
let originalResponse: MusicDataResponse

The original response that contains the error.

get · iOS 15.0+

id

TypeScript
get id(): string
Swift declaration
let id: String

The identifier for the error.

get · iOS 15.0+

code

TypeScript
get code(): number
Swift declaration
let code: Int

The specific code for the underlying cause of the error.

get · iOS 15.0+

title

TypeScript
get title(): string
Swift declaration
let title: String

A developer-friendly title for the error.

get · iOS 15.0+

source

TypeScript
get source(): (MusicDataRequest_Error_Source) | null
Swift declaration
let source: MusicDataRequest.Error.Source?

The source of the error.

get · iOS 15.0+

status

TypeScript
get status(): number
Swift declaration
let status: Int

The HTTP status code for the error.

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →