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

Unify repository error handling #721

Closed
lonng opened this issue Aug 27, 2020 · 0 comments · Fixed by #985
Closed

Unify repository error handling #721

lonng opened this issue Aug 27, 2020 · 0 comments · Fixed by #985
Labels
status/TODO Categorizes issue as we will do it. type/feature-request Categorizes issue as related to a new feature.
Milestone

Comments

@lonng
Copy link
Contributor

lonng commented Aug 27, 2020

Feature Request

Currently, the repository handle errors inconsistent and errors.AddStack everywhere. It's considered bad behavior. We should unify all errors handling in the TiUP repository.

Some initial suggestions:

  • errors.AddStack should be applied to all 3rd/std library call sites
  • errors.Annotate should be applied if some extra information should be attached.
  • Return error directly if we call functions/methods belong to TiUP repository and don't errors.AddStack repeatedly.
@lonng lonng added type/feature-request Categorizes issue as related to a new feature. status/TODO Categorizes issue as we will do it. labels Aug 27, 2020
@lucklove lucklove modified the milestones: v1.2.1, v1.2.2 Oct 12, 2020
@lonng lonng modified the milestones: v1.2.2, v1.3.0 Nov 4, 2020
lucklove added a commit to lucklove/tiup that referenced this issue Dec 11, 2020
ti-chi-bot pushed a commit that referenced this issue Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/TODO Categorizes issue as we will do it. type/feature-request Categorizes issue as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants