Handling 404 on fetch
If I had a query, something like the below in my view user page
Where this will actual throw a 404 error, what would be the best way for me to redirect from the current page (UserView) back to the main table page (UserIndex)? Probay important to note that
userQueries
comes from a composable outside of the component3 Replies
rare-sapphireOP•3y ago
I know I have
onError
in the query but I shouldn't be doing routing from there...correct-apricot•3y ago
Maybe global
onError
handler would work for you?
rare-sapphireOP•3y ago
Each 404 would need to be handled differently depending on where it is
I mean is it a bad thing to use routing in a composable?