Skip to content

Inconsistent HTTP status codes #121

Open
@Xartrick

Description

@Xartrick

Inconsistent HTTP status codes

Issue found of: September 7th, 2021

Endpoint(s):

  • GET /users/{id}/playlists
  • GET /users/{id}/followers
  • GET /playlists/{id}/tracks

Scope(s):

  • User OAuth token

Steps to reproduce:

Get a not found user

$ curl -i --request GET \
--url https://api.soundcloud.com/users/3 \
-H "Authorization: OAuth USER_TOKEN"
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
[...]
{"code":404,"message":"404 - Not Found","link":"https://developers.soundcloud.com/docs/api/explorer/open-api","status":"404 - Not Found","errors":[{"error_message":"404 - Not Found"}],"error":null}

Get a not found user followers

$ curl -i --request GET \
--url https://api.soundcloud.com/users/3/followers \
-H "Authorization: OAuth USER_TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[...]
{"collection":[],"next_href":null}

Expected behaviour:

404 Not Found

Actual behaviour:

200 OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions