Skip to content

Commit

Permalink
return error
Browse files Browse the repository at this point in the history
(cherry picked from commit 3fe01c5)
  • Loading branch information
czarcas7ic authored and mergify[bot] committed Apr 22, 2024
1 parent 3300df5 commit d03eb56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion state/txindex/kv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ func lookForHeight(conditions []query.Condition) (height int64) {

func validatePage(pagePtr *int, perPage, totalCount int) (int, error) {
if perPage < 1 {
panic(fmt.Sprintf("zero or negative perPage: %d", perPage))
return 1, fmt.Errorf("zero or negative perPage: %d", perPage)
}

if pagePtr == nil { // no page parameter
Expand Down

0 comments on commit d03eb56

Please sign in to comment.