Skip to content

Commit

Permalink
fix(rollapp): return not found error when state info not found
Browse files Browse the repository at this point in the history
  • Loading branch information
srene authored Nov 5, 2024
1 parent 870510f commit d081ce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/rollapp/keeper/grpc_query_state_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}

0 comments on commit d081ce7

Please sign in to comment.