index.js
function makeError(jqXHR, textStatus, errorThrown, options) {
    var Constructor = statusToError[textStatus];

    // We did not find anything in the map, which would happen if the textStatus
    // was "error". Determine whether an ``HttpError`` or an ``AjaxError`` must
    // be thrown.
    if (!Constructor) {
      Constructor = statusToError[(jqXHR.status !== 0) ? "http" : "ajax"];
    }

    return new Constructor(jqXHR, textStatus, errorThrown, options);
  }
function makeError(jqXHR, textStatus, errorThrown, options) {
    var Constructor = statusToError[textStatus];

    // We did not find anything in the map, which would happen if the textStatus
    // was "error". Determine whether an ``HttpError`` or an ``AjaxError`` must
    // be thrown.
    if (!Constructor) {
      Constructor = statusToError[(jqXHR.status !== 0) ? "http" : "ajax"];
    }

    return new Constructor(jqXHR, textStatus, errorThrown, options);
  }
function makeError ( jqXHR , textStatus , errorThrown , options ) { var Constructor = statusToError [ textStatus ] ; // We did not find anything in the map, which would happen if the textStatus // was "error". Determine whether an ``HttpError`` or an ``AjaxError`` must // be thrown. if ( ! Constructor ) { Constructor = statusToError [ ( jqXHR . status !== 0 ) ? "http" : "ajax" ] ; } return new Constructor ( jqXHR , textStatus , errorThrown , options ) ; }
Given a ``jqXHR`` that failed, create an error object.
Given a jqXHR that failed create an error object .