UseQuery useErrorBoundary config field inverted? #1198
Unanswered
sean-esper
asked this question in
Q&A
Replies: 1 comment 2 replies
-
React Query by default doesn't throw on an error, instead you get the error as a return of the useQuery const { data, error } = useQuery(..queryArgs) When you enable |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the useQuery config type file I find:
This actually seems inverted. The default behavior (false) seems to be for react-query to add a boundary and prevent the error from bubbling up. I have a custom errorBoundary on my site and therefore to get the error to bubble up I have to set this field to
true
which seems like (according to the field name) that it would add an error boundary rather than remove it.Am I misunderstanding something or should I start drafting up a PR?
Beta Was this translation helpful? Give feedback.
All reactions