Skip to content

Commit 8c24b6b

Browse files
authored
fix(x/group): proper address rendering in error (#22425)
1 parent 55f7cfc commit 8c24b6b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

x/group/keeper/proposal_executor.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ func ensureMsgAuthZ(msgs []sdk.Msg, groupPolicyAcc sdk.AccAddress, cdc codec.Cod
7070
if err != nil {
7171
return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; error retrieving group policy address")
7272
}
73-
return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAddr, acct)
73+
74+
acctStr, _ := addressCodec.BytesToString(acct)
75+
if acctStr == "" {
76+
acctStr = "unmarshalable address"
77+
}
78+
79+
return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "msg does not have group policy authorization; expected %s, got %s", groupPolicyAddr, acctStr)
7480
}
7581
}
7682
}

0 commit comments

Comments
 (0)