Why does throwing a redirect in the route loaders post RC trigger an error?
I've successfully upgraded a codebase to RC before I noticed something that wasn't there pre-RC. The router docs clearly say that you can throw a redirect from the beforeLoad or loader fn of a route. Now, on RC, throwing redirects from the loaders trigger an error. Maybe I'm making a mistake somewhere. Why is this happening and how can I resolve it?

5 Replies
like-gold•2mo ago
can you please provide a complete reproducer ?
rare-sapphireOP•2mo ago
Sorry, my bad. I was throwing a redirect in a try-catch.
like-gold•2mo ago
so works as expected then?
rare-sapphireOP•2mo ago
Yes. Thank you.
like-gold•2mo ago
great!