async function createConnectionClient(req, res) {
  const { models, body, user, appLog } = req;

  const { connectionId } = body;
  if (!connectionId) {
    return res.utils.error('connectionId required');
  }

  const connection = await models.connections.findOneById(connectionId);
  if (!connection) {
    return res.utils.error('connectionId invalid');
  }

  // Return connection client error as it may contain details as to why connection failed (potentially db config related)
  // TODO - Use specific Error for SQL/connection to distinguish between database error and application error
  let connectionClient;
  try {
    connectionClient = await models.connectionClients.createNew(
      connection,
      user
    );
  } catch (error) {
    appLog.error(error, 'Error creating connection client');
    return res.utils.error(error);
  }

  return res.utils.data({
    id: connectionClient.id,
    name: connectionClient.connection.name,
    connectedAt: connectionClient.connectedAt,
    lastKeepAliveAt: connectionClient.lastKeepAliveAt,
  });
}
Creates and connects a connectionClient
@param {Req} req
@param {Res} res