Next.js Discord

Discord Forum

trpc error handling server side

Unanswered
LaPerm posted this in #help-forum
Open in Discord
LaPermOP
how to properly catch the error from procedure on server side in nextjs?

in my case im calling a procedure in server component with param from url, in the middleware i check if the provided param is correct, if not i throw NOT_FOUND, how can i properly handle that error when calling the procedure?

0 Replies