Skip to content

fix(api): Reject negative pagination cursors - #122411

Open
cvxluo wants to merge 1 commit into
masterfrom
cvxluo/reject-negative-pagination-cursors
Open

fix(api): Reject negative pagination cursors#122411
cvxluo wants to merge 1 commit into
masterfrom
cvxluo/reject-negative-pagination-cursors

Conversation

@cvxluo

@cvxluo cvxluo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

If users pass in negative cursors, we raise a 500 rather than a 400. We should validate this so we raise a 400.

Fixes SENTRY-5TES

GenericOffsetPaginator passed negative offsets to backend callbacks, where query builders could raise internal errors.

Reject them with the shared pagination error so API endpoints return 400 consistently.

Fixes SENTRY-5TES

Co-authored-by: Codex <noreply@openai.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 21, 2026
@cvxluo
cvxluo marked this pull request as ready for review August 21, 2026 18:41
@cvxluo
cvxluo requested a review from a team as a code owner August 21, 2026 18:41
@cvxluo
cvxluo requested a review from a team August 21, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant