`MusicItemCollection` does not propagate `MusicItem` decode errors

Originator:darren.mo
Number:rdar://FB13430212 Date Originated:2023-11-30
Status:Open Resolved:
Product:MusicKit Product Version:iOS 17.2 Seed 3 (21C5046c)
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
I have attached a sample project that contains a custom `MusicItem` type. One might create a custom `MusicItem` type to represent a data type in the Apple Music server API that does not exist in MusicKit.

Many Apple Music server responses consist of a collection of items. MusicKit offers a generic `MusicItemCollection` type with which one can decode server responses.

The issue that the sample project demonstrates is that `MusicItemCollection` does not propagate decode errors thrown by the `MusicItem` type. Instead, it logs the error and then drops the error. This prevents developers from customizing the error handling. Instead, `MusicItemCollection` should propagate the error and let the developer decide what to do with it.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!