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

Search endpoints return 404 Not Found if query contains the slash '/' character #187

Closed
ClemensSchneider opened this Issue Mar 22, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@ClemensSchneider

ClemensSchneider commented Mar 22, 2016

We stumbled across an issue when using the slash / character in the query-part of the search endpoint (searching for the album The 20/20 Experience - The Complete Experience):

https://developer.spotify.com/web-api/console/get-search-item/?q=The+20%2F20+Experience+-+The+Complete+Experience&type=album

The response is a HTTP 404 which is not expected to indicate that there are no results. It seems that a 404 is used to indicate an error during search (compare to an empty result https://developer.spotify.com/web-api/console/get-search-item/?q=qwertzzzzz&type=album)

The characters that are not valid in a search query should be documented so people are able to strip them from the query.

@mikesnare

This comment has been minimized.

mikesnare commented Mar 24, 2016

This used to work, so I'm not sure if it's an intentional exclusion that needs documentation or just a regression that should be fixed (and I'd argue it's the latter).

One query in particular that has worked for a while but is now broken is https://api.spotify.com/v1/search?q=De%2FVision&type=artist, which should match https://play.spotify.com/artist/1bN9idF4rgIhaaKFpwgzoQ (De/Vision). I've had to update code to replace slashes with spaces so the query is now https://api.spotify.com/v1/search?q=De+Vision&type=artist, but that's incorrect, since it would allow for "De Vision" (if they existed) to be the better match when the intent was De/Vision.

@thelinmichael thelinmichael added the bug label Mar 24, 2016

@thelinmichael thelinmichael changed the title from Illegal characters for query in search-endpoint that result in a search-error should be documented to Search endpoints return 404 Not Found if query contains the slash '/' character Mar 29, 2016

@thelinmichael thelinmichael added the search label Apr 2, 2016

@jsimonsson

This comment has been minimized.

Member

jsimonsson commented Apr 6, 2016

Thank you for your patience, this issue is now solved.

@jsimonsson jsimonsson closed this Apr 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment