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

improve error message consistency #220

Merged
merged 1 commit into from
Oct 21, 2024
Merged

improve error message consistency #220

merged 1 commit into from
Oct 21, 2024

Conversation

kaihoffman
Copy link
Member

Improve the grammar and consistency of a few error messages

@@ -325,16 +325,16 @@ func decodeError(err error) error {
switch err := err.(type) {
case *url.Error:
if _, ok := err.Err.(net.Error); ok {
err := fmt.Errorf("we found a problem connected against the api")
err := fmt.Errorf("problem connecting to the API")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could return also the error to be more descriptive and allow the user to debug more precisely, what do you think?

this is valid for all the errors in the PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to implement a global flag --debug and if that is true we can show more verbose errors

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not against having a flag or more descriptive errors overall, but just raised this because during a connection problem I noticed the language currently isn't especially clear.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this one, we can put the flag for feature versions

Copy link
Member

@alejandrojnm alejandrojnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kaihoffman kaihoffman merged commit 5e5c976 into master Oct 21, 2024
16 checks passed
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.

3 participants