ahmadawais / corona-cli

🦠 Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). https://x.com/MrAhmadAwais
https://NodeCLI.com
MIT License
1.85k stars 191 forks source link

🐛 FIX: error message for countries not found or without cases #51

Closed Eronmmer closed 4 years ago

Eronmmer commented 4 years ago

Error message for countries not found or without cases

Initially, when users input countries that don't exist or without cases, they get an "API down message". But this has been corrected. View screenshots below

Before: 1

After: 2

ahmadawais commented 4 years ago

API must have been down when you ran that query. The Before one. Can you share exact command you ran to get that?

Eronmmer commented 4 years ago

@ahmadawais the API wasn't down then. I even successfully ran other commands. There was a slight error in the code that handles catching error for countries not found(404 case) and that was what I fixed. Nothing much. The command I ran was corona <random-country-spelled-wrong>

ahmadawais commented 4 years ago

Thank you for this. :)

🔗 https://github.com/ahmadawais/corona-cli/releases/tag/5.2.0 🔗 https://www.npmjs.com/package/corona-cli