http icon indicating copy to clipboard operation
http copied to clipboard

More information about NetworkError

Open jinjor opened this issue 8 years ago • 2 comments

I found cross-origin request returns NetworkError, but this error could be more concrete. I was about to try turning on wifi...

Browser shows some helpful message in console (that end users never see).

XMLHttpRequest cannot load http://package.elm-lang.org/packages/elm-lang/http/1.0.0/Http.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://elm-lang.org' is therefore not allowed access.

How can we get this information?

jinjor avatar Feb 06 '17 19:02 jinjor

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot avatar Feb 06 '17 19:02 process-bot

Apparently this isn't possible - the browser deliberately hides this information for security reasons. If you read the steps for performing a request and the network error steps which it carries out both for a failed connection and a CORS failure, you'll see that the net outcome is that the status is set to "network error".

tekul avatar Aug 12 '19 18:08 tekul