covid-api icon indicating copy to clipboard operation
covid-api copied to clipboard

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

Open HCLarsen opened this issue 4 years ago • 3 comments

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.

HCLarsen avatar Mar 29 '20 23:03 HCLarsen

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 avatar Mar 30 '20 19:03 backtrackbaba

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

backtrackbaba avatar Mar 30 '20 19:03 backtrackbaba

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

HCLarsen avatar Mar 30 '20 20:03 HCLarsen