Skip to content
This repository has been archived by the owner. It is now read-only.

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

Closed
ClemensSchneider opened this issue Mar 22, 2016 · 2 comments
Labels
bug

Comments

@ClemensSchneider
Copy link

@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
Copy link

@mikesnare 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 Illegal characters for query in search-endpoint that result in a search-error should be documented 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
Copy link
Member

@jsimonsson 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants