function assignTxInfo({ shim, req, route, fnName, isErrorWare }) {
  // Fetch the transaction information from that request.
  const txInfo = getTransactionInfo(shim, req)
  if (!txInfo || !txInfo.transaction) {
    shim.logger.debug(
      { txInfo },
      'Could not get transaction info in %s (%s)',
      route,
      fnName
    )
    return null
  }
  txInfo.transaction.nameState.setPrefix(shim._metrics.FRAMEWORK)
  txInfo.errorHandled |= isErrorWare
  return txInfo
}
Updates nameState and errorHandled property of transaction info

@private
@param {object} params object passed to fn
@param {Shim} params.shim instance of shim
@param {string} params.fnName function name
@param {string} params.route route path
@param {object} params.req request object
@param {boolean} params.isErrorWare indicates if it is error middleware
@returns {object| null} updated transaction info