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

Remove Redundant Staking Errors #5450

Closed
4 tasks
alexanderbez opened this issue Dec 26, 2019 · 4 comments · Fixed by #9231
Closed
4 tasks

Remove Redundant Staking Errors #5450

alexanderbez opened this issue Dec 26, 2019 · 4 comments · Fixed by #9231
Labels
C:x/staking good first issue Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@alexanderbez
Copy link
Contributor

Many of the sentinel errors in x/staking are redundant. Typically, these errors are used and returned on invalid input. They should be removed in favor of sdkerrors.ErrInvalidRequest. Typically, this error will be wrapped with additional context on the exact validation error/issue.

ref: #5429 (comment)

/cc @fedekunze


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez alexanderbez added good first issue C:x/staking Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Dec 26, 2019
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 5, 2020
@tac0turtle tac0turtle added pinned and removed stale labels Jul 6, 2020
@jeebster
Copy link
Contributor

I'm happy to help refactoring these errors, but I'm a bit unsure about how to proceed accordingly - technically, almost all of these errors appear to encompass invalid input according to your definition @alexanderbez . Is the idea to deprecate all errors that are a result of malformed request parameters? Could you provide a more specific definition or a list of non-redundant errors, or those that should not be replaced with sdkerrors.ErrInvalidRequest

@jeebster
Copy link
Contributor

Handling this issue via #9231. Please let me know if further error deprecation/refactoring is required

@atheeshp
Copy link
Contributor

Sorry, accidentally closed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/staking good first issue Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants