XMLHttpRequest: event - error (order of events)