Repository navigation
Feature request: defaultOnError
#8495
sachinahya
started this conversation in
Ideas
Replies: 0 comments
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.
We're using TanStack Router with tRPC and TanStack Query (without Start) on a client-side app.
We use the onError callback to catch
NOT_FOUNDerrors from tRPC and translate them tonotFoundso that they trigger thenotFoundComponentrather than theerrorComponent. Currently this has to be registered on every route via a helper function:It would be useful and less error-prone if we could configure this behaviour globally for all routes. A
defaultOnErrorcallback similar todefaultOnCatchwould be useful:All reactions