Emits the "error" event on the `xhr`.

@param {XMLHttpRequest} xhr
@param {Error} err
@private
function reject( xhr, err, headers ) {
	const e = new ProgressEvent( 'error' );
	e.error = e.err = err;
	e.headers = headers;
	xhr.dispatchEvent( e );
}