lib/fetchUtil.js
function handleErrors(errorFormatter, response) {
  if (!response.ok) {
    if (errorFormatter) {
      return errorFormatter(response);
    }

    return defaultErrorFormatter(response);
  }
  return response;
}
function handleErrors(errorFormatter, response) {
  if (!response.ok) {
    if (errorFormatter) {
      return errorFormatter(response);
    }

    return defaultErrorFormatter(response);
  }
  return response;
}
function handleErrors ( errorFormatter , response ) { if ( ! response . ok ) { if ( errorFormatter ) { return errorFormatter ( response ) ; } return defaultErrorFormatter ( response ) ; } return response ; }
If there is a custom errorFormatter use it, otherwise use the default
@param errorFormatter
@param response
@returns {*}
If there is a custom errorFormatter use it otherwise use the default