t
tRPC
T
tRPC
•
4y ago
•
5 replies
TkDodo 🔮
clear cookie onError
I
'd like to clear a cookie
(in nextjs
) when a 403 error happens
. I
've been looking at the global error handling
:
https://trpc.io/docs/error-handling#handling-errors
and this looks like the right place
, except that I don
't have access to the
response
response
, which would be needed to clear a cookie
. Is there a better place to do this
, or is there a reason there is no access to the
res
res
?
Error Handling | tRPC
Whenever an error occurs in a procedure
, tRPC responds to the client with an object that includes an
"error
" property
. This property contains all the information that you need to handle the error in the client
.
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
tRPC onError
J
Joe / ❓-help
3y ago
onError callback type
M
Mugetsu / ❓-help
2y ago
onSuccess and onError in one time
S
Szymon / ❓-help
15mo ago
Cookie authentication flow
S
seven / ❓-help
2y ago