diff --git a/x/observer/keeper/voting.go b/x/observer/keeper/voting.go index 1f624da5aa..51286665c8 100644 --- a/x/observer/keeper/voting.go +++ b/x/observer/keeper/voting.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "github.com/pkg/errors" sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -134,12 +135,12 @@ func (k Keeper) CheckObserverSelfDelegation(ctx sdk.Context, accAddress string) } validator, found := k.stakingKeeper.GetValidator(ctx, valAddress) if !found { - return types.ErrNotValidator + return errors.Wrapf(types.ErrNotValidator, "validator : %s", valAddress) } delegation, found := k.stakingKeeper.GetDelegation(ctx, selfdelAddr, valAddress) if !found { - return types.ErrSelfDelegation + return errors.Wrapf(types.ErrSelfDelegation, "self delegation : %s , valAddres : %s", selfdelAddr, valAddress) } minDelegation, err := types.GetMinObserverDelegationDec()