Skip to content

Normalize negative pagination params#441

Open
giwaov wants to merge 1 commit into
canopy-network:mainfrom
giwaov:issue-pagination-negative-params
Open

Normalize negative pagination params#441
giwaov wants to merge 1 commit into
canopy-network:mainfrom
giwaov:issue-pagination-negative-params

Conversation

@giwaov

@giwaov giwaov commented Jun 28, 2026

Copy link
Copy Markdown

Summary

  • Treat negative pageNumber values like missing values and default them to page 1.
  • Treat negative perPage values like missing values and default them to 10.
  • Add focused LoadArray coverage for negative pagination input.

Why

PageParams are accepted from JSON/RPC as signed integers. Negative values previously bypassed the zero-value defaults and could produce invalid skip indexes and pagination metadata.

Testing

  • git diff --check
  • Not run: Go toolchain is not installed in this environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant