-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
refactor: simply errors #15067
refactor: simply errors #15067
Conversation
@@ -67,12 +67,12 @@ func (s *errorsTestSuite) TestErrorIs() { | |||
}, | |||
"successful comparison to a wrapped error": { | |||
a: ErrUnauthorized, | |||
b: errorsmod.Wrap(ErrUnauthorized, "gone"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was broken, as there were no import for errorsmod
.
Checking if CI checks the errors package properly.
62a2390
to
1e58e31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left one comment, its a bit hidden how errors and pkg/errors .new work. Its quite annoying. If we are fine with not having stack traces on every error this is chill
Thanks @julienrbrt 🙏 |
Description
As Facu rightfully pointed, the SDK uses 5 packages for errors:
This PR attempts to simplify this by:
cosmossdk.io/errors
fromgithub.com/cosmos/cosmos-sdk/types/errors
(refactor: fix lint issues + gofumpt #15062 (comment))github.com/pkg/errors
, except incosmossdk.io/errors
, until we migrate to cockroachdb/errors there too.cosmossdk.io/log
logger #15011, but went ahead and updated to a pseudo version for nowAuthor Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change