From 3d2adf311dd3d163527ce4bf7d2b3a38aa7f90c5 Mon Sep 17 00:00:00 2001 From: lumtis Date: Fri, 4 Oct 2024 12:32:19 +0200 Subject: [PATCH] update errors --- x/observer/keeper/voting.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()