Skip to content

Commit

Permalink
fix(x/group): proper address rendering in error (backport #22425) (#2…
Browse files Browse the repository at this point in the history
…2431)

Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
mergify[bot] and julienrbrt authored Nov 5, 2024
1 parent d67d6a2 commit a98ac47
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion x/group/keeper/proposal_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ func ensureMsgAuthZ(msgs []sdk.Msg, groupPolicyAcc sdk.AccAddress, cdc codec.Cod
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; error retrieving group policy address")
}
return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAddr, acct)

acctStr, _ := addressCodec.BytesToString(acct)
if acctStr == "" {
acctStr = "unmarshalable address"
}

return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAddr, acctStr)
}
}
}
Expand Down

0 comments on commit a98ac47

Please sign in to comment.