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?
找不到电影或节目?登录并创建它吧。
Travis Bell 的回复
于 2016 年 11 月 03 日 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.