Test for XHR error handling.