Axios, ExpressMiddleware and TRPCErrors
We have an express based TRPC server and our procedures are calling our endpoints using axios. So when our users credentials provided expired or are incorrect Axios will return with a 401 as it should. I need to get this UNAUTHORIZED 401 error to the frontend but no matter what I try TRPC throws is as a 500 INTERNAL_SERVER_ERROR. I tried error formatter and on error and I hoped to get the httpStatus code from the axios error somehow but I only get access to the message. Can someone here be so kind and point me in the right direction to forward the errors from our Axios Instances as such to the React TRPC client. 