#propagating errors to global error boundary
11 messages · Page 1 of 1 (latest)
it looks like onSubmit will propagate errors to the global error boundary, but granular validation functions will not
propagating errors to global error boundary
if it's an error that should propagate outside of your form, then why use a form-scoped validator? are you perhaps looking for a form listener instead?
soooo
#TIL that queryClient.fetchQuery throwing does not propagate to global boundaries
that's my actual issue.. nothing to do with tanstack form!
it doesnt??
I guess we both learned something then
Ya gotta wrap it in a useMutation
Or do useQuery with enabled false and trigger later
That does not sound right...
https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientfetchquery
It will either resolve with the data or throw with the error.
Why wouldn't it propagate up to the nearest error boundary
Maybe it’s an issue with how I have error handling configured