You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By quick look it seems that the Spotify Web API crate we use does not handle the 429 response. It does return an Error, though. If that contains the Retry-After header information we can kick off another request once the desired waiting time has passed.
The text was updated successfully, but these errors were encountered:
One way to reduce the number of requests being sent in the first place is to debounce the "play" event by a small interval like <= 1s, because if you, for instance, press "next" or "previous" a lot of times in quick succession, then you'll make a lot of unnecessary requests. I find I frequently run into this, which causes the audio to blank out while the API tries to fetch the song.
Ah, good point. I never had it during playback, only when downloading playlist data. It's a little bit problematic, that rate limiting is applied per client ID and independent on the amount of users.. 😞
Users with a lot of playlists that contain a large amount of tracks may encounter rate limits imposed by Spotify.
We should respect the
Retry-After
header: https://developer.spotify.com/documentation/web-api/#rate-limitingBy quick look it seems that the Spotify Web API crate we use does not handle the
429
response. It does return anError
, though. If that contains theRetry-After
header information we can kick off another request once the desired waiting time has passed.The text was updated successfully, but these errors were encountered: