React randomly throws error in production environment

222 Views Asked by At

My React app randomly throws an error every time I request data from the API using Axios, but it just happened sometimes. When the error shows up, it says that the connection is reset (ECONNRESET) and tls.onwrap and if I refresh the page it's working again. But after some time, it'll happen again.

Pic

What makes it very odd is that the error only happens in the production environment. If I open it in the development environment, everything is okay. Then we checked the TLS version, we used Cloudflare. So we changed the TLS version from 1.0 to 1.2. But the error still occurred.

So what could have been possibly wrong ? is it because of the SSL? because the production environment is using the https protocol or is it because of the axios ?

0

There are 0 best solutions below