ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
639 stars 123 forks source link

`tracks_features` breaks on deserialization when a track is requested that doesn't have audio features #421

Closed caass closed 1 year ago

caass commented 1 year ago

Describe the bug Requesting tracks_features for a track that doesn't have features returns null, which serde_json doesn't expect.

To Reproduce Steps to reproduce the behavior:

  1. Request tracks_features for a track that doesn't have features (e.g. spotify:track:6z99LwRS28wga9xc2u09Po)
  2. Note that serde_json says "unexpected null"

Expected behavior A track which doesn't have features should be filtered out in the response.

Log/Output data

error=json parse error: invalid type: null, expected struct AudioFeatures at line 1522 column 9
Error:
   0: json parse error: invalid type: null, expected struct AudioFeatures at line 1522 column 9
   1: invalid type: null, expected struct AudioFeatures at line 1522 column 9

Additional context Add any other context about the problem here.

erie-of-the-lake commented 1 year ago

Given that this issue was resolved by #422 and was acknowledged as such in the changelog under Breaking changes and Bugfixes for version 0.12.0, this issue should be closed.