-
Notifications
You must be signed in to change notification settings - Fork 98
feat: add error tracking and retry methods to query collection utils #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add error tracking and retry methods to query collection utils #441
Conversation
More templates
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
ChatGPT's review https://chatgpt.com/share/68add190-8f64-800c-bc40-1218ca9d9e7f |
🦋 Changeset detectedLatest commit: d7e8009 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Thanks @KyleAMathews. I updated the error tracking logic and added a retry test in a7cf838 per the review.
Edited: 62d3e86 added documentation for error tracking utils. The Edited: 1947a57 Thinking about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Sorry for the delay getting this in. I'm just starting to come back from parental leave.
@lucasweng btw I made a few follow-up issues (linked here in the PR). Feel free to pick up any of them! |
No problems at all! Thanks for taking time to look into this 🙏🏻 |
…anStack#441) Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
Summary
lastError
,isError
,errorCount
andclearError
methods to query collection utils per Enhanced Error Handling and Reporting for query-db-collection #347clearError
triggers a refetch, and collection operations function as expected with cached data while in an error state.Note: To keep the diff focused, this PR does not implement
onError
,onSettled
, anduseErrorBoundary
. These will be addressed in a separate PR.Test Plan