1
votes

I consistently get this response

{ error: { status: 500, message: 'Server error.' } }

when I try to retrieve all playlists for my user using this endpoint

GET https://api.spotify.com/v1/users/{user_id}/playlist

I am doing this repeatedly as a test case while I develop the plumbing for my Spotify web api application.

Sometimes it fails when I start at offset 0. Sometimes it succeeds at offset 0 (and offset 50, 100, 150, etc.) and fails later. I have about 900 playlists.

It fails whether I get 20 playlists at a time or the maximum of 50.

I see nothing unusual in the response headers.

Is this a bug on the Spotify's end? I assume since I'm getting status 500 that this is not related to hitting a request rate limit of some kind, or some error in my request.

I would appreciate any insight anyone has to offer.

1

1 Answers

0
votes

Responses with status code 500 from the /v1/users/{user_id}/playlists/ endpoint can be caused by a number of reasons, none of which is your application's fault. There are cases where a user's list of playlists (or an individual playlist) cause temporary issues in Spotify's backend. This occurs more often if the list of playlists have a lot of revisions, e.g. the user has an unusually large amount of playlists and have removed, added and moved them around a lot. We're working on resolving this but meanwhile we ask you to try again.

This isn't related to any of the query parameters sent in the request, it's simply an intermittent error.

Is this a bug on the Spotify's end? I assume since I'm getting status 500 that this is not related to hitting a request rate limit of some kind, or some error in my request.

Spotify's Web API return a response with status code 429 if the request has been rate limited. A list of which status codes are returned from the Web API can be found in the User Guide.