1

On localhost the application runs flawlessly but on production I'm getting this error when doing a post request on a trpc end point.

Application error: a client-side exception has occurred (see the browser console for more information).

This is what is inside the console. enter image description here

I've spent time trying to understand trpc error handling but haven't had any success

Thank you

EDIT: For anyone else coming across this - there were multiple issues with this:

  1. The type used in catch block was incorrect.
  2. Vercel deployment defaults to 10 second timeouts whereas my api request was taking more time.
  3. I was trying to infer json from the text as I didn't account for the timeouts.

Hope that helps

Binny.H
  • 83
  • 6

0 Answers0