code: function makeEventError(error) {
    var stack = error.stack.split('\n');
  
    stack.splice(0, 1);
    stack.forEach(function(s, i) {
      stack[i] = s.trim();
    });
  
    return {
      type: typeName(error),
      error: error.message,
      stack: stack.filter(function(s) {
        return s;
      })
    };
  }
docs: Given an error object, returns an event error as expected in the `info` field
  of ecs-logs messages.
  
  @param {Object} error The error object to convert.
  
  @return {Object} An event error object generated from the argument.