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

Log better error messages in CLI (#549) #702

Merged
merged 4 commits into from
Dec 1, 2021
Merged

Log better error messages in CLI (#549) #702

merged 4 commits into from
Dec 1, 2021

Conversation

BruceMacD
Copy link
Collaborator

@BruceMacD BruceMacD commented Nov 30, 2021

  • Add context to error messages in the CLI so that the user has actions to take
  • Wrap error outputs in red formatting to make them stand out
  • Capitalize user facing errors

It is frustrating for users to see a generic error message with no clear actions to take. These messages will help the user understand what is going on.

It was also easy to miss errors (specifically in a login flow where many lines are output at once during context switches, #694) so I brought back the red formatting:

Screen Shot 2021-11-30 at 2 56 13 PM

Improvements here will be an on-going effort.

CC: @FSHA for any feedback on user outputs (error messages are anything following a fmt.Errorf line).

  • Wrote appropriate unit tests
  • Considered security implications of the change
  • Updated associated docs where necessary
  • Updated associated configuration where necessary
  • Change is backwards compatible if it needs to be (user can upgrade without manual steps?)
  • Nothing sensitive logged

resolves #
#549
#694

- Add context to error messages in the CLI so that the user has actions to take
- Wrap error outputs in red formatting to make them stand out
- Capitalize user facing errors
internal/cmd/cmd.go Outdated Show resolved Hide resolved
internal/cmd/config.go Outdated Show resolved Hide resolved
internal/cmd/login.go Outdated Show resolved Hide resolved
internal/cmd/login.go Show resolved Hide resolved
@BruceMacD BruceMacD merged commit b25c3f0 into main Dec 1, 2021
@BruceMacD BruceMacD deleted the cmd-feedback branch December 1, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants