code: function getErrorHeaders (err) {
    if (!err.headers || typeof err.headers !== 'object') {
      return undefined
    }
  
    var headers = Object.create(null)
    var keys = Object.keys(err.headers)
  
    for (var i = 0; i < keys.length; i++) {
      var key = keys[i]
      headers[key] = err.headers[key]
    }
  
    return headers
  }
docs: Get headers from Error object.
  
  @param {Error} err
  @return {object}
  @private