Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide proper status codes for some endpoints #59

Open
Noam-Bendelac opened this issue Dec 26, 2020 · 0 comments
Open

Decide proper status codes for some endpoints #59

Noam-Bendelac opened this issue Dec 26, 2020 · 0 comments
Labels
backend Backend functionality implementation Possible implementation idea to keep in mind

Comments

@Noam-Bendelac
Copy link
Collaborator

Noam-Bendelac commented Dec 26, 2020

Living document of what status codes different endpoints will have:

Route Status code
Errors:
/admin/*, wrong admin key 4031
/api/*, not logged in2 401
/api/playlists/:id[/*], id doesn't exist OR exists but user is not allowed 404
/api/playlists/:id[/*], spotify playlist doesn't exist (if checked) 500
Successes:
POST /api/playlists/:pid/tracks/:tid/chat 201
PUT /api/playlists/:pid/tracks/:tid/removed 200
POST /api/playlists/:id/tracks 201
POST /api/playlists/:id/chat 201

1 I think it's ok to say "this resource exists but you don't have access" — the code is open source anyway
2 No access_token cookie OR access_token not found in userid cache; this assumes the refresh token endpoint will be moved out of /api/

@Noam-Bendelac Noam-Bendelac added implementation Possible implementation idea to keep in mind backend Backend functionality labels Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend functionality implementation Possible implementation idea to keep in mind
Projects
None yet
Development

No branches or pull requests

1 participant