Skip to content

fix(react-query): scope error boundary reset by query#10707

Open
raashish1601 wants to merge 1 commit into
TanStack:mainfrom
raashish1601:codex/2712-errored-queries-caught-by-errorboundary-are-not-retried
Open

fix(react-query): scope error boundary reset by query#10707
raashish1601 wants to merge 1 commit into
TanStack:mainfrom
raashish1601:codex/2712-errored-queries-caught-by-errorboundary-are-not-retried

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

  • track QueryErrorResetBoundary reset consumption by queryHash instead of a single global boolean
  • keep reset markers query-scoped for useQuery, useQueries, and suspense fetch failures so sibling queries cannot consume another query's reset
  • add a regression for the sibling-query/unmount reset case from Errored queries caught by ErrorBoundary are not retried on mount #2712
  • add a patch changeset for @tanstack/react-query

Fixes #2712.

Validation

  • corepack pnpm --dir packages/react-query exec vitest run src/__tests__/QueryResetErrorBoundary.test.tsx
  • corepack pnpm --dir packages/react-query exec vitest run src/__tests__/useSuspenseQuery.test.tsx src/__tests__/useQueries.test.tsx
  • corepack pnpm --filter @tanstack/react-query test:eslint (with temporary local symlink shim; 0 errors, existing warnings only)
  • corepack pnpm --dir packages/react-query exec tsc --noEmit -p tsconfig.codex.json (temporary local tsconfig excluding Windows symlink placeholders)
  • git diff --check

Note: this checkout has core.symlinks=false, so package symlink config files are materialized as plain text on Windows. I used temporary local shims for lint/type validation and restored them before committing. build:tsup reached JS/TSC build success but DTS generation failed locally because API Extractor could not resolve ajv/dist/core from this pnpm install.

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.

Errored queries caught by ErrorBoundary are not retried on mount

1 participant