Can I redirect the user from inside my router?
I have a query protectedProcedure, which returns an object from my prisma planetscale db
What's the best way to redirect the user to a 404 page if the item doesn't exist on the db? I wanted something like
Should I just handle it in the front-end with a useEffect?
What's the best way to redirect the user to a 404 page if the item doesn't exist on the db? I wanted something like
res.redirect("/404") but can't seem to find a way to do itShould I just handle it in the front-end with a useEffect?