Description
The current error handeling is not comprehensive as there is no way to add a equivalent friendly message from the cause of an error.
For example, here in the login command we check if the user is already logged in. In the method to check if they are logged in, we just retrun the error as is shown
This is problematic because at the command level package, we have to guess exactly why the login check failed. It would be much better, if we can add a helpful message from the login check method so that we do not have to guess the exact cause at command package level.
I propose that we add a new Error type like so
type Error struct {
Err error
DebugMessage string
FriendlyMessage string
}
This will allow us to add a FriendlyMessage for every error, allowing us to print the exact message we want to show to the end user for any error message. Please ask questions if you need more clarification.