-
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: keyring errors #14974
refactor: keyring errors #14974
Conversation
"github.com/cosmos/cosmos-sdk/crypto/hd" | ||
"github.com/stretchr/testify/require" |
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.
please revert this import move.
We follow
std libs
third party libs
internal libs
seems like it moved around in other files as well
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.
That's many public errors and a few that are very specific and only used once.
What's the reason of extracting them all?
// ErrLegacyToRecord is raised when cannot be converted to a Record | ||
ErrLegacyToRecord = errors.New("unable to convert LegacyInfo to Record") | ||
// ErrUnknownLegacyType is raised when a LegacyInfo type is unknown. | ||
ErrUnknownLegacyType = errors.New("unknown LegacyInfo type") |
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.
Curious why extracting very specific errors like that. Will they be reused?
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.
All this errors are returned at some point. I decided to make them public so other package can check against them and do what is convenient
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.
Thanks for using cockroach errors 🙌
@JulianToledano I think you still need to rebase. That new queue thing does not seem to do that with your fork. |
Description
Closes:
#14970
As a part of #14940 this PR:
cockroachdb/errors
Author 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