-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Right now when we use a tanstack query, either adhoc via useSafeQuery or as suspense via useSafeSuspenseQuery,
when the user navigates away, Tanstack throws a CancelledError, which we catch as defect and then classically report to Sentry.
We also filter for it in nuxt error boundaries in two separate places.
It seems to me it would be better if the resulting effect instead gets the interrupted status, and interrupted errors are not reported to Sentry.
As you can't interrupt an effect, only a fiber, here's an example workaround we might add to
libs/packages/vue/src/query.ts
Line 75 in 8fe5bab
| .pipe( |
pseudo
Effect.catchAllDefect((defect) =>
`${defect}`.includes("CancelledError") ? Exit.interrupt(FiberId.none) : Effect.die(defect)
),Metadata
Metadata
Assignees
Labels
No labels