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

Handle bad internet connection #74

Open
flacial opened this issue Mar 15, 2023 · 0 comments
Open

Handle bad internet connection #74

flacial opened this issue Mar 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@flacial
Copy link
Member

flacial commented Mar 15, 2023

Problem

The CLI depends on an active internet connection, when there isn't, it throws an unhandled error. To handle this scenario gracefully, we can display an error message when the network connection is lost.

Optional: add a check for the network connection before sending any requests, and show an appropriate message if the connection is not available.

How to reproduce

Close your internet connection and run c0d3 login

Expected behavior

$ npx c0d3 login

✔ Username: user
✔ Password: 4321

Oops, looks like we're having trouble connecting to our servers. It's possible your internet connection is playing hard to get. Make sure you're connected to a strong and stable internet connection and check if any sneaky firewalls or internet settings are getting in the way. If you're still having issues, don't sweat it - just give us a shout and we'll help you get things sorted!

Please create an issue about it with a way to reproduce it in https://github.com/garageScript/c0d3-cli/issues

Actual behavior

$ npx c0d3 login
✔ Username: user
✔ Password: 4321
✖ Unhandled error. Please create an issue about it with a way to reproduce it in https://github.com/garageScript/c0d3-cli/issues
@flacial flacial added the bug Something isn't working label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant