Queries without results return 404, imho it should be just an empty response as it's valid for query to return no results.

Comments

Status: Needs review » Needs work

The last submitted patch, d7_restws_query_empty.patch, failed testing.

mr.baileys’s picture

Status: Needs work » Needs review
StatusFileSize
new1.5 KB

The test was failing since instead of an empty collection/list, no list was returned. I changed to code so that an empty list is returned when there are no items, test is now succeeding. I also added an additional test to ensure that no 404 status code is returned.

klausi’s picture

Status: Needs review » Fixed

Comitted, thanks!

  • Commit 8449ec0 on 7.x-2.x by klausi:
    Issue #2207775 by mr.baileys, fago: Fixed Avoid 404 for queries without...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.