0

I've done a fair bit of research, but I can't find anything conclusive on what HTTP response to send in the case that there are no results to be returned.

Ie. The request was correctly formed, no errors occurred, we took a trip to the database and came back empty handed...there just isn't any data to return.

Should I return a 200 and an empty result set? The only HTTP response that seems close is 204, but it doesn't allow for a Message body. None of the error codes (400 or 500 level) seem accurate to the situation.

aaron
  • 164
  • 1
  • 9
  • Does this answer your question? [What is the proper REST response code for a valid request but an empty data?](https://stackoverflow.com/questions/11746894/what-is-the-proper-rest-response-code-for-a-valid-request-but-an-empty-data) – Brian61354270 Jun 27 '22 at 19:02
  • Kind of? It's the same question, but the answers are less than conclusive. – aaron Jun 27 '22 at 19:33

0 Answers0