I have a few playlists that don't have any images because they only have songs stored locally from my phone. This causes the currentUserPlaylists method to return a SpotifyDecodingError.
Printing description of error:
▿ Optional<Error>
▿ some : SpotifyDecodingError: The data from the Spotify web API could not be decoded into 'PagingObject<Playlist<PlaylistItemsReference>>'
URL: https://api.spotify.com/v1/me/playlists?offset=0
http status code: 200
pretty coding path: PagingObject<Playlist<PlaylistItemsReference>>.items[21].images
Underlying error:
▿ Swift.DecodingError.valueNotFound
▿ valueNotFound: (2 elements)
- .0: Swift.Array<Any> #0
▿ .1: Swift.DecodingError.Context
▿ codingPath: 3 elements
- CodingKeys(stringValue: "items", intValue: nil)
▿ _JSONKey(stringValue: "Index 21", intValue: 21)
▿ rep: Foundation._JSONKey.Rep.index
- index: 21
- CodingKeys(stringValue: "images", intValue: nil)
- debugDescription: "Cannot get unkeyed decoding container -- found null value instead"
- underlyingError: nil
I have a few playlists that don't have any images because they only have songs stored locally from my phone. This causes the currentUserPlaylists method to return a SpotifyDecodingError.
example of the playlist that caused the error: