Currently, the response created in the load event of XMLHttpRequest inside XHRBackend just creates a Response object with the body set, but is not setting the status or statusText properties from the XMLHttpRequest instance. Furthermore, a type of "error" should be set to the response in certain conditions, and should be emitted to the Response observable/stream as an error instead of a value.
Currently, the response created in the
loadevent ofXMLHttpRequestinsideXHRBackendjust creates aResponseobject with the body set, but is not setting thestatusorstatusTextproperties from theXMLHttpRequestinstance. Furthermore, atypeof "error" should be set to the response in certain conditions, and should be emitted to theResponseobservable/stream as an error instead of a value.