code: function success(result, ignore) {
      return ((typeof result.error === 'undefined' &&
          typeof result.status === 'undefined' &&
          typeof result.success === 'undefined') ||
          (result.status && result.status === 'success') ||
          (result.success && result.success === true) ||
          (ignore && result.error && !ignore.test(result.error))) ? true : false;
  }
docs: Check result data for success, allowing override to ignore some errors