text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  var _defineProperty = require('babel-runtime/core-js/reflect/define-property');
  
  var _defineProperty2 = _interopRequireDefault(_defineProperty);
  
  var _extendError = require('extend-error');
  
  var _extendError2 = _interopRequireDefault(_extendError);
  
  var _httpCore = require('@ciscospark/http-core');
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  /**!
   *
   * Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file.
   * @private
   */
  
  var SparkHttpError = (0, _extendError2.default)(_httpCore.HttpError, {
    parseFn: function parseFn(res) {
      var _HttpError$prototype$;
  
      for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        rest[_key - 1] = arguments[_key];
      }
  
      /* eslint prefer-reflect: [0] */
      var message = (_HttpError$prototype$ = _httpCore.HttpError.prototype.parseFn).call.apply(_HttpError$prototype$, [this, res].concat(rest));
  
      (0, _defineProperty2.default)(this, 'options', {
        enumerable: false,
        value: res.options
      });
  
      if (this.options.url) {
        message += '\n' + this.options.method + ' ' + this.options.url;
      } else if (this.options.uri) {
        message += '\n' + this.options.method + ' ' + this.options.uri;
      } else {
        message += '\n' + this.options.method + ' ' + this.options.service.toUpperCase() + '/' + this.options.resource;
      }
      message += '\nWEBEX_TRACKING_ID: ' + this.options.headers.trackingid;
      if (this.options.headers && this.options.headers['x-trans-id']) {
        message += '\nX-Trans-Id: ' + this.options.headers['x-trans-id'];
      }
      message += '\n';
  
      return message;
    },
  
    subTypeName: 'SparkHttpError'
  });
  
  _httpCore.HttpError.makeSubTypes(SparkHttpError);
  
  exports.default = SparkHttpError;
  //# sourceMappingURL=spark-http-error.js.map
  