-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(x/circuit): add autocli options for tx #17956
Conversation
@@ -37,6 +37,10 @@ func (srv msgServer) AuthorizeCircuitBreaker(ctx context.Context, msg *types.Msg | |||
// Check that the authorizer has the permission level of "super admin" | |||
perms, err := srv.Permissions.Get(ctx, address) | |||
if err != nil { | |||
if errorsmod.IsOf(err, collections.ErrNotFound) { |
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.
The error is quite ugly otherwise.
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.
i thought this was fixed? something was removed and this was removed from other places
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.
No, you are thinking of another fix on the walk iterator (#17289).
This quite makes sense to return not found. We have such checks at other places in the SDK (e.g.
cosmos-sdk/x/staking/keeper/unbonding.go
Lines 65 to 70 in 45b44e6
ubd, err = k.UnbondingDelegations.Get(ctx, collections.Join(delAddr, valAddr)) | |
if err != nil { | |
if errors.Is(err, collections.ErrNotFound) { | |
return types.UnbondingDelegation{}, types.ErrNoUnbondingDelegation | |
} | |
return types.UnbondingDelegation{}, err |
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.
one question. maybe @testinginprod can help answer
(cherry picked from commit 4df8b37)
Co-authored-by: Julien Robert <[email protected]>
Description
Closes: #17955
Blocked on #17913Author 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
make lint
andmake test
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