Skip to content

Conversation

@ColemanDunn
Copy link

@ColemanDunn ColemanDunn commented Jan 26, 2026

🎯 Changes

Make Trigger Error set data to null so that error boundaries can be more easily tested using the devtools (no longer need to manually edit the data to trigger error boundary).

More info here: #10044

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced error state handling in the DevTools query inspector. When triggering an error for an active query, the data state is now properly reset to undefined in addition to status and error properties, ensuring more accurate query state representation during error scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest commit: 7528079

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@tanstack/query-devtools Minor
@tanstack/angular-query-experimental Patch
@tanstack/react-query-devtools Patch
@tanstack/solid-query-devtools Patch
@tanstack/svelte-query-devtools Patch
@tanstack/vue-query-devtools Patch
@tanstack/angular-query-persist-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

Adds a changeset file documenting a minor version bump for @tanstack/query-devtools. Modifies the QueryDetails component in Devtools.tsx to reset the data property to undefined when triggering an error for the active query.

Changes

Cohort / File(s) Summary
Changeset
.changeset/many-toes-speak.md
Documents minor version bump with description "Set data to undefined on Trigger Error"
Query Devtools
packages/query-devtools/src/Devtools.tsx
Adds data: undefined to state update in QueryDetails when triggering error, ensuring data property is cleared alongside error status

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • TkDodo
  • birkskyum

Poem

🐰 When errors hop into view,
Data vanishes, fresh and new,
Undefined paths clear the way,
Devtools recovers—hip hooray!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the template with all required sections completed: Changes section explains the motivation, Checklist items are marked, and Release Impact indicates a changeset was generated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately reflects the main change: setting data to undefined when triggering errors in the query devtools, which aligns with the PR objectives and file modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ColemanDunn
Copy link
Author

Do these changes count as dev-only (per This change is docs/CI/dev-only (no release))?

@ColemanDunn ColemanDunn changed the title Set query data to undefined when an error is triggered feat(query-devtools)-set-data-to-undefined-on-Trigger-Error-in-TanstackQueryDevtools Jan 26, 2026
@ColemanDunn ColemanDunn changed the title feat(query-devtools)-set-data-to-undefined-on-Trigger-Error-in-TanstackQueryDevtools feat(query-devtools) set data to undefined on Trigger Error in TanstackQueryDevtools Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant