Adam BorygoA
tRPC6mo ago
1 reply
Adam Borygo

error handling on server side

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?
Was this page helpful?