Peter-Schorn/SpotifyAPI

SpotifyDecodingError when fetching from /me/playlists endpoint

Closed this issue · 3 comments

I'm using the newest (2.2.4) release of this library and when calling .currentUserPlaylists() method on SpotifyAPI I get an error.

More detailed error description:
SpotifyDecodingError: The data from the Spotify web API could not be decoded into 'PagingObject<Playlist<PlaylistItemsReference>>' URL: https://api.spotify.com/v1/me/playlists http status code: 200 pretty coding path: PagingObject<Playlist<PlaylistItemsReference>>.items[49].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 49", intValue: 49) ▿ rep: Foundation._JSONKey.Rep.index - index: 49 - CodingKeys(stringValue: "images", intValue: nil) - debugDescription: "Cannot get unkeyed decoding container -- found null value instead" - underlyingError: nil

Please try the latest commit on master. Close if this fixes your issue.

See also 0379910 and #57.

It did fix the issue, thank you for quick reponse!

Hey, just wanting to say thanks for the quick reply indeed. This solved the issue in my app too.