Prisma client error: cannot read properties of undefined

I have a web application built with an express.js backend, PostgreSQL db and use Prisma client. I have 2 separate POST routes in the app, /api/chat and /api/sendRecReview (code below). This web app is hosted on Render.

app.post("/api/chat", async (req, res) => {
  try {
    const clientIp = req.ip;
    const timestamp = new Date();
    const messageHistory =
      req.body.messageHistory.map((messageObj) => messageObj.User) || [];

    const answers = req.body.answers;

    console.log(messageHistory);
    const responseObj = await querydb(messageHistory, answers);
    const updatedMessageHistory = req.body.messageHistory.concat({
      AI: responseObj.text,
    });

    // Arrange club recs data to save in database
    const clubData = updatedMessageHistory[1].AI;
    const clubString = clubData.replace("```jsonn", "").replace("n```", "");
    const clubRecsToSave = JSON.parse(clubString);

    // Save IP address, timestamp, and recommendations to the database
    const session = await prisma.session.create({
      data: {
        clientIp: clientIp,
        timestamp: timestamp,
        answers: JSON.stringify(answers),
        recommendations: JSON.stringify(clubRecsToSave),
      },
    });

    res
      .status(200)
      .json({ messageHistory: updatedMessageHistory, clientIp: clientIp });
  } catch (error) {
    console.error(error);
    res
      .status(500)
      .json({ error: "An error occurred while processing the request" });
  }
});
app.post("/api/sendRecReview", async (req, res) => {

  try {
    const clientIp = req.ip; 
    const timestamp = new Date();
    const answers = req.body.answers;
    const recommendations = req.body.clubs;
    const rating = req.body.rating;

    const review = await prisma.review.create({
      data: {
        clientIp: clientIp, 
        timestamp: timestamp,
        answers: JSON.stringify(answers),
        recommendations: JSON.stringify(recommendations),
        rating,
      },
    });

    res.status(200).json({ response: "Rating Successful" });
  } catch (error) {
    console.error(error);
    res
      .status(500)
      .json({ error: "An error occurred while processing the request" });
  }
});
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Session {
  id              String   @id @default(uuid())
  clientIp        String
  timestamp       DateTime @default(now())
  answers         String
  recommendations String
}

model Review {
  id              String   @id @default(uuid())
  clientIp        String
  timestamp       DateTime @default(now())
  answers         String
  recommendations String
  rating          String
}

When I hit both routes in localhost, the data correctly saves to both the Session table and the Review table in the database. When I run these on the Render hosted site, the data is correctly saved to the Session table but not the Review table. I get the below error telling me review is undefined when I run .create on it.

TypeError: Cannot read properties of undefined (reading 'create')
at file:///opt/render/project/src/index.js:258:25
at Layer.handle [as handle_request] (/opt/render/project/src/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/render/project/src/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/opt/render/project/src/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/opt/render/project/src/node_modules/express/lib/router/layer.js:95:5)
at /opt/render/project/src/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/opt/render/project/src/node_modules/express/lib/router/index.js:346:12)
at next (/opt/render/project/src/node_modules/express/lib/router/index.js:280:10)
at /opt/render/project/src/node_modules/body-parser/lib/read.js:137:5
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
==> Detected service running on port 10000
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding

Migrations have been run and all code has been pushed to Github and deployed to Render. The only slight variation is the Review table was created separately as part of the second migration as where Session was part of the first migration. Can anyone think of why the Review table is not being recognized at runtime on Render but is working fine in localhost?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật