t
tRPC
Can I redirect the user from inside my router? - tRPC
O
tRPC
•
4y ago
•
6 replies
Outis
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
res.redirect("/404")
res.redirect("/404")
but can
't seem to find a way to do it
Should I just handle it in the front
-end with a useEffect
?
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,951
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How can I access ctx from inside of a procedure?
S
santi / ❓-help
3y ago
How can i createCaller from a NextJs App Router if my server uses express tRPC adapter?
K
Kylar / ❓-help
3y ago
How do you call a router procedure from another router procedure?
C
chico / ❓-help
2y ago