rspotify
rspotify copied to clipboard
json parse error when getting playlist with no image
Describe the bug
Calling get-playlist
API with playlist having no image will return a response with images
field null
. However, according to https://docs.rs/rspotify-model/0.12.0/rspotify_model/playlist/struct.FullPlaylist.html, rspotify
specifies the field as Vec<Image>
. This leads to the following error when parsing the json response:
json parse error: invalid type: null, expected a sequence at line 1 column 293: invalid type: null, expected a sequence at line 1 column 293
To Reproduce Steps to reproduce the behavior:
- Create a new playlist with Spotify, making sure that it has no image
- Call
get-playlist
API using the new playlist's URI - Observe
images
field has a value ofnull