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?
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 3 de noviembre de 2016 a las 11:15
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.