open-risk-data-dashboard icon indicating copy to clipboard operation
open-risk-data-dashboard copied to clipboard

Undefined dataset is returned as 200 response

Open thom4parisot opened this issue 6 years ago • 3 comments

When I request for https://dev.riskopendata.org/api/dataset/?country=undefined (not an ID) or https://dev.riskopendata.org/api/dataset/?country= (absent ID) or https://dev.riskopendata.org/api/dataset/?country=9999 (unexisting ID), the API returns a 200 response.

  • I expect it to return a 404 when the country does not exist in the database.
  • I expect it to return a 200 with an empty array if the country exists but there is not data.
  • I expect it to return a 200 with array items if the country exists and data exists

thom4parisot avatar Dec 07 '18 22:12 thom4parisot