function handleError({ transaction, req, error }) {
  if (req.listenerCount('error') > 0) {
    logger.trace(error, 'Not capturing outbound error because user has already handled it.')
    return false
  }

  logger.trace(error, 'Captured outbound error on behalf of the user.')
  transaction.agent.errors.add(transaction, error)
  return true
}
Notices the given error if there is no listener for the `error` event on the
request object.

@param {object} params to function
@param {Transaction} params.transaction active transaction
@param {object} params.req http.ClientRequest
@param {Error} params.error If provided, unhandled error that occurred during request
@returns {boolean} True if the error will be collected by New Relic.