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 the error formatting #237

Closed
RiccardoM opened this issue Jul 17, 2020 · 0 comments · Fixed by #238
Closed

Unify the error formatting #237

RiccardoM opened this issue Jul 17, 2020 · 0 comments · Fixed by #238
Assignees
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add quality/code-cleanliness Improves the overall quality of code
Milestone

Comments

@RiccardoM
Copy link
Contributor

Context

Currently when we return the errors from the ValidateBasic or Validate methods, we have some conflicts in the formatting of the strings: some of them are capitalized while others are not. Also, sometimes we return sdkerrors.Wrap while some others we return fmt.ErrorF.

Proposal

I propose to unify the returned errors, registering custom errors where needed (using sdkerrors.Register), returning always sdkerrors.Wrap and de-capitalizing all the error strings, as suggested in the official Go documentation.

@RiccardoM RiccardoM added kind/enhancement Enhance an already existing feature; no "New feature" to add quality/code-cleanliness Improves the overall quality of code labels Jul 17, 2020
@RiccardoM RiccardoM added this to the v0.10.0 milestone Jul 17, 2020
@RiccardoM RiccardoM self-assigned this Jul 17, 2020
@RiccardoM RiccardoM mentioned this issue Jul 17, 2020
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add quality/code-cleanliness Improves the overall quality of code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant