soundcloud / api

A public repo for our Developer Community to engage about bugs and feature requests on our Public API
148 stars 24 forks source link

Incomplete / inconsistent data returned from track reposts endpoint during outage #69

Open mgoodfellow opened 3 years ago

mgoodfellow commented 3 years ago

Title: Incomplete / Invalid data returned from track reposts endpoint during issues last night

Issue found of: July 3th, 2021 Issue resolved of July 4th, 2021

Endpoint(s):

GET https://api.soundcloud.com/tracks/1078586815/reposters?page_size=200&client_id=XXX

Scope(s):

Steps to reproduce:

curl --request GET \
  --url 'https://api.soundcloud.com/tracks/1078586815/reposters?page_size=200&client_id=XXX'

Expected behaviour:

A list of reposters as described in the documentation, and where the list matches what is reflected on the website for this track (as an example - this is the track from the above ID - https://soundcloud.com/keepdreaminkofi/sell-my-soul-3/reposts).

I'm aware of issues at SoundCloud last night - https://status.soundcloud.com/

However, last night during the outage we were getting a valid 200 OK response, but with empty collection of data. This is a pretty critical error from a data consistency point of view. If the data upstream cannot be fetched, this method should not be returning a valid response with an empty data collection. Rather, as an API consumer I expect the call to fail via 5XX errors.

We cannot assume an empty collection to be an error condition as this is a perfectly valid condition in normal operation.

Actual behaviour:

200 OK but with empty collection

This issue now appears to be resolved, but this caused us problems when issues were ongoing last night.

It would be great if this could be investigated for future! Many thanks!

dasha-kobzeva commented 3 years ago

HI @mgoodfellow,

thank you for reposting the issue. We understand that empty collection and error responses are not equivalent.

We have created a ticket to investigate the matter and update all the necessary logic in our backlog. It might take some time until this is shipped, so please bear with us.