Announcements

Help Wizard

Step 1

NEXT STEP

Getting saved tracks returns inconsistent result for different offsets

Getting saved tracks returns inconsistent result for different offsets

Plan

Premium

Country

GB

 

Device

It's dev API

Operating System

N/A

 

My Question or Issue

Last 2-3 days I started observing a strange behaviour - I'm requesting all the saved tracks for a user and for some of requests the API returns an empty result even though there ARE tracks in the range.

 

For example, this is logs from my app:

 

 

Response: href=https://api.spotify.com/v1/me/tracks?offset=200&limit=50, limit=50, next=null, offset=200, previous=https://api.spotify.com/v1/me/tracks?offset=150&limit=50, total=0, items.length=0

Response: href=https://api.spotify.com/v1/me/tracks?offset=250&limit=50, limit=50, next=https://api.spotify.com/v1/me/tracks?offset=300&limit=50, offset=250, previous=https://api.spotify.com/v1/me/tracks?offset=200&limit=50, total=2272, items.length=50

 

 

 

Note here that the second response that has higher offset (250) has some tracks, but the previous request doesn't have any tracks and even its `total` field is empty.

 

Can you fix the API please? It's really annoying getting such gliches due wrong deploy and fix the app time to time although nothing has changed, and as soon as the issue still persist after a few days you aren't even noticed about that by your metrics or alerts.

Reply
1 Reply

Same here. For the last few days calls to https://api.spotify.com/v1/me/tracks with an offset has randomly return a Code 200 response, but with an empty track array. This absolutely should not happen, because my app had no way of knowing that something was wrong and several automated processes **bleep** up because of it.

Suggested posts