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