I have some task depending to healthcheck endpoint.
I need to get some response from backend or get net::ERR_NAME_NOT_RESOLVED
this error if we outside some network.
Currently i trying to send request to my endpoint and locally i get error with status: 0 but on the live server i've got TypeError. Any ideas how i can handle net::ERR_NAME_NOT_RESOLVED
?
p.s. no matter what request im using, fetch
and xmlhttprequest
doesnt work to
UPD:
On the live server i can get CORS error from back-end but its ok for me, and im sure that i have access to other endpoints. Locally and outside the network ill get net::ERR_NAME_NOT_RESOLVED
I have some task depending to healthcheck endpoint.
I need to get some response from backend or get net::ERR_NAME_NOT_RESOLVED
this error if we outside some network.
Currently i trying to send request to my endpoint and locally i get error with status: 0 but on the live server i've got TypeError. Any ideas how i can handle net::ERR_NAME_NOT_RESOLVED
?
p.s. no matter what request im using, fetch
and xmlhttprequest
doesnt work to
UPD:
On the live server i can get CORS error from back-end but its ok for me, and im sure that i have access to other endpoints. Locally and outside the network ill get net::ERR_NAME_NOT_RESOLVED
- If you find a solution to your problem, I would be very grateful if you could share it. – Mehrshad Farzaneh Commented Feb 5, 2022 at 7:28
- @MehrshadFarzaneh its impossible on FE app because it's a network-level error. – Igor Zinchenko Commented May 18, 2024 at 13:11
2 Answers
Reset to default 1Clear your browser cookies:
Browser cookies can block your Internet DNS and then cause the ERR_NAME_NOT_RESOLVED
error. You can try clearing browser cookies to fix this error.
Or
Flush and renew DNS
Flushing and renewing DNS is a very good way to fix the ERR_NAME_NOT_RESOLVED
error — this method is quite easy to perform and it is very effective.
In a front-end application, you can't directly handle this error because it's a network-level error.