code: function RetryPolicy(options) {
    options = options || {};
  
    if (typeof options.maxAttempts === 'number') {
      this.maxAttempts = options.maxAttempts;
    }
    else {
      this.maxAttempts = RetryPolicy.DEFAULT_MAX_ATTEMPTS;
    }
  
    if (typeof options.codes === 'function') {
      this.isRetryable = options.codes;
    }
    else {
      this.codes = options.codes || RetryPolicy.DEFAULT_RETRYABLE_ERRORS;
    }
  }
docs: Retry policy controls behavior of Rorschach in case of errors.
  
  @constructor
  @param {Object} [options] Options:
  @param {Number} options.maxAttempts Max number of attempts
  @param {Array.<String>|Function} options.codes Error codes or error validation function