Skip to content

Report a failed paginated query page to its own subscribers - #208

Open
stickerdaniel wants to merge 1 commit into
convex:mainfrom
stickerdaniel:fix/paginated-query-errors
Open

stickerdaniel wants to merge 1 commit into
convex:mainfrom
stickerdaniel:fix/paginated-query-errors

Conversation

@stickerdaniel

@stickerdaniel stickerdaniel commented Oct 24, 2026 •

Copy link
Copy Markdown

Fixes #193.

When one page of a paginated query fails, PaginatedQueryClient.onBaseTransition reads it while building the transition and throws. Nothing is delivered: the onError of onPaginatedUpdate_experimental never runs, and every later transition throws the same way. ConvexReactClient routes all transitions through the paginated client, so once a page of usePaginatedQuery_experimental fails, every useQuery in the app stops updating.

  • onBaseTransition handles each paginated query on its own and reports a failure as a new Failed modification for that query only.
  • localQueryResultByToken also reads the pages of an ongoing split, so a failed half surfaces while the other half is still loading.
  • ConvexClient no longer reads a paginated result outside the try that calls onError, neither to check readiness nor when a subscriber registers.

loadMore on a failed query still throws at the caller. I left that out to keep this focused.

The new tests drive the real ConvexClient and ConvexReactClient over withInMemoryWebSocket. All five fail on main and pass with this change.

Implemented with Claude Opus 5.5 (xhigh) and reviewed with GPT-6 (Extra High) in Claude Code via T3 Code.

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.

onPaginatedUpdate_experimental: a failed page never reaches onError, and later transitions throw (1.46.0)

1 participant