From d081ce7aab3f2c58ab28f3427e7a634789eac3d7 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Tue, 5 Nov 2024 15:06:26 +0100 Subject: [PATCH] fix(rollapp): return not found error when state info not found --- x/rollapp/keeper/grpc_query_state_info.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/rollapp/keeper/grpc_query_state_info.go b/x/rollapp/keeper/grpc_query_state_info.go index b0d228e60..b37a05a0d 100644 --- a/x/rollapp/keeper/grpc_query_state_info.go +++ b/x/rollapp/keeper/grpc_query_state_info.go @@ -70,7 +70,7 @@ func (k Keeper) FindStateInfoByHeight(ctx sdk.Context, rollappId string, height stateInfoIndex, found := k.GetLatestStateInfoIndex(ctx, rollappId) if !found { - return nil, errorsmod.Wrapf(types.ErrNotFound, + return nil, errorsmod.Wrapf(gerrc.ErrNotFound, "LatestStateInfoIndex wasn't found for rollappId=%s", rollappId) } @@ -92,5 +92,5 @@ func (k Keeper) FindStateInfoByHeight(ctx sdk.Context, rollappId string, height startInfoIndex = midIndex + 1 } } - return nil, errorsmod.Wrapf(types.ErrStateNotExists, "StateInfo wasn't found for rollappId=%s, height=%d", rollappId, height) + return nil, errorsmod.Wrapf(gerrc.ErrNotFound, "StateInfo wasn't found for rollappId=%s, height=%d", rollappId, height) }