Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    That's the correct answer. The server has a response it can report, and it is the correct response, therefore it should be status 200. An array is very practical to report 0, 1 or more items in a response. And the client only has to check for status 200 (I've got a correct response), or anything else (something went wrong). Commented Nov 1, 2019 at 11:14
  • 14
    In a nutshell, 404 means "I don't know what you are referring to". This is very different from, "I know exactly what you are asking but there's no data." The only exception here is that the RFC says you can use 404 as a substitute for 403 forbidden to avoid confirming the existence of the URI to an unauthorized user. Commented Nov 1, 2019 at 15:51
  • @JimmyJames Well put, I took the liberty of adding that to the answer Commented Nov 4, 2019 at 8:44