You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This way the client is able to get more information about the error (except for the status code, which is redundant with the HTTP status code). In order to be somewhat independent of the actual error message the application should provide unique, application specific, status codes which help to better identify the error programmatically.
As an example, the endpoint addTrackToQueue returns with a status code 400 if the requested track already exists in the given queue. Which is fine, but the client cannot distinguish such an AlreadyExists error from a SpotifyBadRequest error.
The text was updated successfully, but these errors were encountered:
If a REST endpoint fails to execute successfully it returns a JSON object of the structure
to the client.
This way the client is able to get more information about the error (except for the
status
code, which is redundant with the HTTP status code). In order to be somewhat independent of the actual error message the application should provide unique, application specific, status codes which help to better identify the error programmatically.As an example, the endpoint
addTrackToQueue
returns with a status code400
if the requested track already exists in the given queue. Which is fine, but the client cannot distinguish such anAlreadyExists
error from aSpotifyBadRequest
error.The text was updated successfully, but these errors were encountered: