Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages when api is down #37

Closed
Alex61NN5 opened this issue Mar 24, 2020 · 2 comments
Closed

Better error messages when api is down #37

Alex61NN5 opened this issue Mar 24, 2020 · 2 comments
Assignees
Labels

Comments

@Alex61NN5
Copy link

@Alex61NN5 Alex61NN5 commented Mar 24, 2020

As I write this issue it seems that https://corona.lmao.ninja/countries is down? so the cli hangs for around 2 minutes and then spits out the following error

undefined UNHANDLED ERROR
undefined ERROR → Error
i REASON → Request failed with status code 524
i ERROR STACK ↓
 Error: Request failed with status code 524
    at createError (C:\Users\user\AppData\Roaming\npm\node_modules\corona-cli\node_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Users\user\AppData\Roaming\npm\node_modules\corona-cli\node_modules\axios\lib\core\settle.js:17:12)
    at IncomingMessage.handleStreamEnd (C:\Users\user\AppData\Roaming\npm\node_modules\corona-cli\node_modules\axios\lib\adapters\http.js:236:11)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Would be better to have some sort of timeout a minute or so and then notify the user that the api is down / can't be reached

@ahmadawais

This comment has been minimized.

@ahmadawais ahmadawais closed this Mar 24, 2020
@Alex61NN5

This comment has been minimized.

Copy link
Author

@Alex61NN5 Alex61NN5 commented Mar 24, 2020

Beautiful! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.