Reputation: 1953
How can the XMLHttpRequest error details be logged via Javascript when error event occurs? I could not find such a property of the error event. But when using developer tools of browsers, the developer tools supply the detailed information about the error. Is there a way to do this via Javascript?
Upvotes: 2
Views: 260
Reputation: 139
You can add an event listener an output the event object.
request.addEventListener("error",function(event) {console.log(event);},false);
Upvotes: 2