Friday, December 02, 2016

How to provide proper error messages to users of your software

Shitty error message when the Internet connection is turned off. When you do:

git remote show origin

Error is:

ssh: Could not resolve hostname nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

This is meaningless error message. Does not tell the user in simple language the cause of the problem and how to resolve it. How about:

Hey, you dummy, you are not connected to the Internet. Check your Internet connection and try again.

No comments:

Post a Comment