open-risk-data-dashboard
open-risk-data-dashboard copied to clipboard
Undefined dataset is returned as 200 response
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