Closed gcampax closed 3 years ago
Are we sure this is a rate limiting issue? According to https://developer.spotify.com/documentation/web-api/ 503 represents a service unavailable error and 429 represents rate limiting.
Well, it smells like a rate limiting, but it has 503 error. I don't think we've seen a 429 error before? Either way, we should handle both sensibly, by retrying and then bailing.
We finally got a handle on the misterious error without message. In case of rate limiting, the server will reply with HTTP 503 and no request body.
Example from the scenario tests:
According to spec, there might be a
Retry-After
header telling us how long to wait before issuing a new request. Otherwise, we should try again once after a fixed timeout. Failing that we throw an error telling that Spotify is temporarily not available and the user should try again later.