I don't know if this has been noted before and if the issue is still open but my search through the topics proved fruitless.
Using the /search endpoint I am unable to generate a 404 response from the server. Using an invalid API key generates the expected 401 response, but searching for "fdäsöalkfew'aläasäldä" returns a 200 response with an empty data set.
If we are supposed to do the error checking ourselves by evaluating the length of the data set returned by the server then why provide the 404 example response in the documentation?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on November 3, 2016 at 11:15 AM
Hi @Hakuren
An empty
results
array should never return a 404. That's simply an HTTP status code, telling you the expected HTTP response, which unless there was an error or that method didn't exist, should return a 200.I don't think an empty results array is an "error", there's just no results. You are free to code around no results however you wish.