Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



I still prefer 200 with an empty list for the 'no results' case. The same client code works, rather than having to code for 204.

- If I query for an identifier which doesn't exist - Server replies 404, this should fall into my error handling as there's a data inconsistency

- If I query say like ?category=automotive&price=1 and I get a 200 containing a json body in which there's an empty list of matches, then my client code can handle 0 matches as well as 1 or 10 with no special handling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: