How to retrieve exact information about a network error? Chrome browser prints things like "net::ERR_CONNECTION_TIMED_OUT" or "net::ERR_CERT_INVALID" into console but how can I retrieve them via JS? Is that possible to get them at all? Currently I use fetch API but I can switch to XMLHTTPRequest easily.
I need that to handle such errors to inform a user and let him know what does he need to do.
This information is intentionally inaccessible from JavaScript to prevent security issues.
Here is a Chromium bug report requesting this functionality in May 2017: https://bugs.chromium.org/p/chromium/issues/detail?id=718447
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With