Currently, I am facing a task related to the health check endpoint where I need to receive a response from the backend or encounter a net::ERR_NAME_NOT_RESOLVED
error if we are outside of a specific network.
When attempting to send a request to my endpoint, I receive an error with status: 0 locally but encounter a TypeError on the live server. Any suggestions for how I can effectively manage the net::ERR_NAME_NOT_RESOLVED
issue?
P.S. Regardless of the type of request I use, neither fetch
nor xmlhttprequest
seems to work.
Update:
On the live server, I may encounter a CORS error from the backend, which is acceptable to me. I am confident that I have access to other endpoints. However, both locally and outside of the network, I consistently run into the net::ERR_NAME_NOT_RESOLVED
error.