I'm working on an application that uses MusicKit and I'm trying to access Artists that are in a user's library. When I create the library request then call response()
, I can see that it throws. The issue is I don't know what kind of errors can be thrown from this method. Are there specific errors in the MusicKit library that I should expect?
let request = MusicLibraryRequest<Artist>()
do {
let response = try await request.response()
return .success(response.items)
} catch let error {
// what are the possible instances for this error?!
return .failure(.unknown(error: error))
}