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

doctor: improve error messages #746

Merged
merged 5 commits into from
Sep 25, 2019

Conversation

lucasbento
Copy link
Member

Summary:

This is related to #694, it improves the error messages by maintaining consistency between the health checks with one separated function to log errors.

It also fixes a problem introduced on #743 where it shows undefined when the description is not provided on a health check.

Before

Before

After

After with consistent error messages

Test Plan:

  1. Make a health check fail;
  2. /path/to/cli doctor.

@lucasbento lucasbento mentioned this pull request Sep 24, 2019
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

One thing and we're good

command,
)}`,
);
addBlankLine();
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 this is the one that causes extra space which is not necessary imho

Copy link
Member Author

Choose a reason for hiding this comment

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

Which space do you mean? the one before iOS or the one after iOS is done?

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member Author

Choose a reason for hiding this comment

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

That's because there's a space after each health check category (in this case Common and iOS) and also a space after each error is shown, that's why that extra space is there.

To be sincere I actually tried to get rid of it but there isn't an easy way to do at the moment, if we remove this last space then it can get to a funky UI when the previous health check succeeded but the next one failed.

Copy link
Member Author

Choose a reason for hiding this comment

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

The best way to do this is to actually check if the last health check failed, if so then print only one space instead of two.

Copy link
Member

Choose a reason for hiding this comment

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

Let's figure this out later, this is a very minor inconvenience

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for commenting about this though!

@thymikee thymikee merged commit 5d33617 into master Sep 25, 2019
@thymikee thymikee deleted the refactor/doctor-improve-error-messages branch September 25, 2019 11:39
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