Adding onerror responses to xhr and xdr