backtrackbaba / covid-api

API's to interact with COVID19 dataset by John Hopkins University
https://covidapi.info/
MIT License
77 stars 19 forks source link

Returns a 200 status code even when a wrong country code is used #13

Open HCLarsen opened 4 years ago

HCLarsen commented 4 years ago

When sending a non-existent country code, for example:

https://covidapi.info/api/v1/country/CAI

The proper response should include a 404 status code, but instead, it gives a 200.

backtrackbaba commented 4 years ago

Hi @HCLarsen,

Sorry for the delay in response and thank you for pointing it out. It was an oversight on my end.

Let me fix it up and push it to prod ASAP

backtrackbaba commented 4 years ago

@HCLarsen It's been fixed. Thank you for reporting the bug. Feel free to point out any other issues that you come across.

HCLarsen commented 4 years ago

That's great, but an API response shouldn't include HTML, it should return JSON.