Unknown throws value for method in MusicKit

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))
}

The errors are generally related to whether the requested contents can load. There isn't a specific error type to code against but the errors will complain that your MusicItemType can't be loaded with a reason as to why.

Rico
WWDR - DTS - Software Engineer

Unknown throws value for method in MusicKit
 
 
Q