How to handle throw redirect() from server functions when using ensureQueryData?
I'm using it in my route like this:
The problem is that the redirection thrown from the server function (throw redirect(...)) is not being handled—it simply does nothing. I understand that I could use useServerFn() to catch the redirect, but doing so would prevent me from using ensureQueryData.
How can I properly handle the redirection thrown by getCurrentUserFn in the loader, while still using ensureQueryData (or an alternative)?