Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More information about NetworkError #21

Open
jinjor opened this issue Feb 6, 2017 · 2 comments
Open

More information about NetworkError #21

jinjor opened this issue Feb 6, 2017 · 2 comments
Labels

Comments

@jinjor
Copy link

jinjor commented Feb 6, 2017

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?

@process-bot
Copy link

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.

@evancz evancz added the request label Jul 20, 2017
@tekul
Copy link

tekul commented Aug 12, 2019

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants