This forum is now read-only. Please use our new forums at discuss.codecademy.com.

How to use APIs with JavaScript Forum

View Course

450 points
Picture
Submitted by
Ethan Pauly
over 4 years ago

Why is it doing this?

var xhr = new XMLHttpRequest();
xhr.open("GET", "http://www.codecademy.com/doesnt_exist", false);
xhr.send();
console.log(xhr.status);
console.log(xhr.statusText);

Oops,try again did you console.log(xhr.status)?


6 votes

permalink

I just figured it out. Some asshole created a doesnt_exist profile. HAHAHA. So the call for the status can't possibly work now. I entered a bunch of gibberish after http://www.codecademy.com/ and it accepted it fine. I'll try to contact the instructor who made this course.

267 points
533f02a0548c35fee2001841_364453454
Submitted by
Sharmaine
over 4 years ago

3 Comments

187777ab22abc721462978ee1802796f?s=140&d=retro Aww sum over 4 years ago

That asshole

529603bdf10c6063e8001e80_564572369?awsaccesskeyid=akiajkz7qvqfd72xnj3q&expires=1513049158&signature=%2f%2bjo7cqnnu4cbpaaearo0l8ezw0%3d Alex Amy about 4 years ago

hey

Picture Mike Hunts Harry about 4 years ago

xhr.send(What yah sending) ; end quote"


1 vote

permalink

I'm having the same problem.

267 points
533f02a0548c35fee2001841_364453454
Submitted by
Sharmaine
over 4 years ago


0 votes

permalink

Questions posted to this forum originating from a given Exercise should perhaps be linked from within that Exercise to make it especially easy for people to find the specifically relevant content. Just an idea. I'm sure I'm not the only one who (besides Ethan) who sat frustrated for several minutes before checking the forum to learn asshole.create = Profile(" doesnt_exist"). :)

I would like to recommend this site to some of my staff learning on the side, but this issue makes me hesitate... :( Maybe Eric could build in some automated error checking of the lesson integrity to run every 15m or 1h and alert him -- he could then take albeit not 100% ideal step of blocking the IP or, force people to get an Account before using the Production Lesson server and close them out that way... This site has real promise, I hope these issues can be ironed out - good luck!

10 points
4ba9d7f6a4a50e254b093adbfa80a207?s=140&d=retro
Submitted by
Mike Apgar
over 4 years ago


0 votes

permalink

yes I have the same problem too...

384 points
D75de7cacb775d8dc3789a0942d3ffb9?s=140&d=retro
Submitted by
Halimaton Saadiah
over 4 years ago