[2026-08-30T16:54:55.454Z] INFO Error logger initialised
[2026-08-30T20:22:14.727Z] INFO Error logger initialised
[2026-08-30T23:00:23.886Z] INFO Error logger initialised
[2026-08-30T23:05:38.291Z] INFO Error logger initialised
[2026-08-30T23:08:38.287Z] ERROR PrismaClientKnownRequestError: 
Invalid `prisma.refreshToken.delete()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:51:29

  48 const stored = await prisma.refreshToken.findUnique({ where: { tokenHash: hashToken(token) }, include: { user: true } })
  49 if (!stored || stored.expiresAt < new Date() || stored.user.status !== 'ACTIVE' || stored.userId !== payload.sub) { res.clearCookie('refreshToken', { path: '/api/auth' }); throw new AppError(401, 'Your session has expired. Please sign in again.') }
  50 // Rotate the refresh credential on every use so a copied/old token cannot be replayed.
→ 51 await prisma.refreshToken.delete(
An operation failed because it depends on one or more records that were required but not found. No record was found for a delete.
PrismaClientKnownRequestError: 
Invalid `prisma.refreshToken.delete()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:51:29

  48 const stored = await prisma.refreshToken.findUnique({ where: { tokenHash: hashToken(token) }, include: { user: true } })
  49 if (!stored || stored.expiresAt < new Date() || stored.user.status !== 'ACTIVE' || stored.userId !== payload.sub) { res.clearCookie('refreshToken', { path: '/api/auth' }); throw new AppError(401, 'Your session has expired. Please sign in again.') }
  50 // Rotate the refresh credential on every use so a copied/old token cannot be replayed.
→ 51 await prisma.refreshToken.delete(
An operation failed because it depends on one or more records that were required but not found. No record was found for a delete.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:228:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:51:3)
[2026-08-30T23:09:05.202Z] INFO Error logger initialised
[2026-08-31T17:22:58.727Z] INFO Error logger initialised
[2026-08-31T17:37:27.752Z] INFO Error logger initialised
[2026-08-31T17:40:10.964Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.cart.findFirst()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\cart.ts:12:193

   9 export const cartRouter = Router()
  10 const cartInclude = { items: { include: { product: { include: { images: { take: 1, orderBy: { sortOrder: 'asc' as const } }, brand: true } }, variant: true }, orderBy: { createdAt: 'asc' as const } } }
  11 const identity = (req: Express.Request) => req.user ? { userId: req.user.id } : req.sessionId ? { sessionId: req.sessionId } : null
→ 12 const getCart = async (req: Express.Request, create = false) => { const owner = identity(req); if (!owner) throw new AppError(400, 'A session ID is required.'); const cart = await prisma.cart.findFirst(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.cart.findFirst()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\cart.ts:12:193

   9 export const cartRouter = Router()
  10 const cartInclude = { items: { include: { product: { include: { images: { take: 1, orderBy: { sortOrder: 'asc' as const } }, brand: true } }, variant: true }, orderBy: { createdAt: 'asc' as const } } }
  11 const identity = (req: Express.Request) => req.user ? { userId: req.user.id } : req.sessionId ? { sessionId: req.sessionId } : null
→ 12 const getCart = async (req: Express.Request, create = false) => { const owner = identity(req); if (!owner) throw new AppError(400, 'A session ID is required.'); const cart = await prisma.cart.findFirst(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async getCart (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\cart.ts:12:175)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\cart.ts:13:86)
[2026-08-31T17:40:11.529Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:18)
[2026-08-31T17:40:13.194Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:18)
[2026-08-31T17:40:13.198Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.$transaction([prisma.product.findMany()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\catalog.ts:13:68

  10 const q = z.object({ search: z.string().optional(), category: z.string().optional(), brand: z.string().optional(), minPrice: z.coerce.number().nonnegative().optional(), maxPrice: z.coerce.number().positive().optional(), sort: z.enum(['newest','price-asc','price-desc','rating','recommended']).default('recommended'), page: z.coerce.number().int().positive().default(1), limit: z.coerce.number().int().min(1).max(48).default(12) }).parse(req.query)
  11 const where: Prisma.ProductWhereInput = { isActive: true, status: 'ACTIVE', category: q.category ? { slug: q.category } : undefined, brand: q.brand ? { slug: q.brand } : undefined, price: { gte: q.minPrice, lte: q.maxPrice }, OR: q.search ? [{ name: { contains: q.search, mode: 'insensitive' } }, { sku: { contains: q.search, mode: 'insensitive' } }, { brand: { name: { contains: q.search, mode: 'insensitive' } } }] : undefined }
  12 const orderBy: Prisma.ProductOrderByWithRelationInput = q.sort === 'price-asc' ? { price: 'asc' } : q.sort === 'price-desc' ? { price: 'desc' } : q.sort === 'rating' ? { averageRating: 'desc' } : q.sort === 'newest' ? { createdAt: 'desc' } : { isFeatured: 'desc' }
→ 13 const [items, total] = await prisma.$transaction([prisma.product.findMany(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.$transaction([prisma.product.findMany()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\catalog.ts:13:68

  10 const q = z.object({ search: z.string().optional(), category: z.string().optional(), brand: z.string().optional(), minPrice: z.coerce.number().nonnegative().optional(), maxPrice: z.coerce.number().positive().optional(), sort: z.enum(['newest','price-asc','price-desc','rating','recommended']).default('recommended'), page: z.coerce.number().int().positive().default(1), limit: z.coerce.number().int().min(1).max(48).default(12) }).parse(req.query)
  11 const where: Prisma.ProductWhereInput = { isActive: true, status: 'ACTIVE', category: q.category ? { slug: q.category } : undefined, brand: q.brand ? { slug: q.brand } : undefined, price: { gte: q.minPrice, lte: q.maxPrice }, OR: q.search ? [{ name: { contains: q.search, mode: 'insensitive' } }, { sku: { contains: q.search, mode: 'insensitive' } }, { brand: { name: { contains: q.search, mode: 'insensitive' } } }] : undefined }
  12 const orderBy: Prisma.ProductOrderByWithRelationInput = q.sort === 'price-asc' ? { price: 'asc' } : q.sort === 'price-desc' ? { price: 'desc' } : q.sort === 'rating' ? { averageRating: 'desc' } : q.sort === 'newest' ? { createdAt: 'desc' } : { isFeatured: 'desc' }
→ 13 const [items, total] = await prisma.$transaction([prisma.product.findMany(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
[2026-08-31T17:40:13.201Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.storeSetting.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\content.ts:13:117

  10 contentRouter.post('/contact', asyncHandler(async (req, res) => { const data = z.object({ name: z.string().min(2), email: z.string().email(), phone: z.string().optional(), subject: z.string().min(3), message: z.string().min(10).max(3000) }).parse(req.body); const message = await prisma.contactMessage.create({ data }); res.status(201).json({ success: true, data: { id: message.id } }) }))
  11 contentRouter.post('/reviews', authenticate, asyncHandler(async (req, res) => { const data = z.object({ productId: z.string(), rating: z.number().int().min(1).max(5), title: z.string().min(2), comment: z.string().min(10).max(2000) }).parse(req.body); const purchased = await prisma.orderItem.findFirst({ where: { productId: data.productId, order: { userId: req.user!.id, status: 'DELIVERED' } } }); if (!purchased) throw new AppError(403, 'Reviews are available after a verified purchase.'); const review = await prisma.review.upsert({ where: { productId_userId: { productId: data.productId, userId: req.user!.id } }, create: { ...data, userId: req.user!.id, isVerifiedPurchase: true }, update: { rating: data.rating, title: data.title, comment: data.comment, status: 'PENDING' } }); res.status(201).json({ success: true, data: review }) }))
  12 contentRouter.post('/coupons/validate', asyncHandler(async (req, res) => { const { code, subtotal } = z.object({ code: z.string(), subtotal: z.number().nonnegative() }).parse(req.body); const now = new Date(); const coupon = await prisma.coupon.findUnique({ where: { code: code.toUpperCase() } }); if (!coupon) throw new AppError(400, 'Invalid coupon.'); if (!coupon.isActive || (coupon.startsAt && coupon.startsAt > now) || (coupon.expiresAt && coupon.expiresAt < now) || (coupon.usageLimit != null && coupon.usageCount >= coupon.usageLimit)) throw new AppError(400, 'Expired coupon.'); if (coupon.minimumSpend && subtotal < Number(coupon.minimumSpend)) throw new AppError(400, 'Your bag does not meet the minimum spend for this coupon.'); let discount = coupon.type === 'PERCENTAGE' ? subtotal * Number(coupon.value) / 100 : Number(coupon.value); if (coupon.maximumDiscount) discount = Math.min(discount, Number(coupon.maximumDiscount)); res.json({ success: true, data: { code: coupon.code, discount: Math.min(discount, subtotal) } }) }))
→ 13 contentRouter.get('/store-settings', asyncHandler(async (_req, res) => { const settings = await prisma.storeSetting.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.storeSetting.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\content.ts:13:117

  10 contentRouter.post('/contact', asyncHandler(async (req, res) => { const data = z.object({ name: z.string().min(2), email: z.string().email(), phone: z.string().optional(), subject: z.string().min(3), message: z.string().min(10).max(3000) }).parse(req.body); const message = await prisma.contactMessage.create({ data }); res.status(201).json({ success: true, data: { id: message.id } }) }))
  11 contentRouter.post('/reviews', authenticate, asyncHandler(async (req, res) => { const data = z.object({ productId: z.string(), rating: z.number().int().min(1).max(5), title: z.string().min(2), comment: z.string().min(10).max(2000) }).parse(req.body); const purchased = await prisma.orderItem.findFirst({ where: { productId: data.productId, order: { userId: req.user!.id, status: 'DELIVERED' } } }); if (!purchased) throw new AppError(403, 'Reviews are available after a verified purchase.'); const review = await prisma.review.upsert({ where: { productId_userId: { productId: data.productId, userId: req.user!.id } }, create: { ...data, userId: req.user!.id, isVerifiedPurchase: true }, update: { rating: data.rating, title: data.title, comment: data.comment, status: 'PENDING' } }); res.status(201).json({ success: true, data: review }) }))
  12 contentRouter.post('/coupons/validate', asyncHandler(async (req, res) => { const { code, subtotal } = z.object({ code: z.string(), subtotal: z.number().nonnegative() }).parse(req.body); const now = new Date(); const coupon = await prisma.coupon.findUnique({ where: { code: code.toUpperCase() } }); if (!coupon) throw new AppError(400, 'Invalid coupon.'); if (!coupon.isActive || (coupon.startsAt && coupon.startsAt > now) || (coupon.expiresAt && coupon.expiresAt < now) || (coupon.usageLimit != null && coupon.usageCount >= coupon.usageLimit)) throw new AppError(400, 'Expired coupon.'); if (coupon.minimumSpend && subtotal < Number(coupon.minimumSpend)) throw new AppError(400, 'Your bag does not meet the minimum spend for this coupon.'); let discount = coupon.type === 'PERCENTAGE' ? subtotal * Number(coupon.value) / 100 : Number(coupon.value); if (coupon.maximumDiscount) discount = Math.min(discount, Number(coupon.maximumDiscount)); res.json({ success: true, data: { code: coupon.code, discount: Math.min(discount, subtotal) } }) }))
→ 13 contentRouter.get('/store-settings', asyncHandler(async (_req, res) => { const settings = await prisma.storeSetting.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\content.ts:13:91)
[2026-08-31T17:40:13.206Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.banner.findMany()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\catalog.ts:19:143

  16 catalogRouter.get('/products/:slug', asyncHandler(async (req, res) => { const item = await prisma.product.findFirst({ where: { slug: String(req.params.slug), isActive: true }, include: { brand: true, category: true, images: { orderBy: { sortOrder: 'asc' } }, variants: { where: { isActive: true } }, reviews: { where: { status: 'APPROVED' }, include: { user: { select: { firstName: true, lastName: true } } } } } }); if (!item) throw new AppError(404, 'Product not found.'); res.json({ success: true, data: item }) }))
  17 catalogRouter.get('/categories', asyncHandler(async (_req, res) => res.json({ success: true, data: await prisma.category.findMany({ where: { isActive: true }, orderBy: { sortOrder: 'asc' } }) })))
  18 catalogRouter.get('/brands', asyncHandler(async (_req, res) => res.json({ success: true, data: await prisma.brand.findMany({ where: { isActive: true }, orderBy: { name: 'asc' } }) })))
→ 19 catalogRouter.get('/banners', asyncHandler(async (_req, res) => { const now = new Date(); res.json({ success: true, data: await prisma.banner.findMany(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.banner.findMany()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\catalog.ts:19:143

  16 catalogRouter.get('/products/:slug', asyncHandler(async (req, res) => { const item = await prisma.product.findFirst({ where: { slug: String(req.params.slug), isActive: true }, include: { brand: true, category: true, images: { orderBy: { sortOrder: 'asc' } }, variants: { where: { isActive: true } }, reviews: { where: { status: 'APPROVED' }, include: { user: { select: { firstName: true, lastName: true } } } } } }); if (!item) throw new AppError(404, 'Product not found.'); res.json({ success: true, data: item }) }))
  17 catalogRouter.get('/categories', asyncHandler(async (_req, res) => res.json({ success: true, data: await prisma.category.findMany({ where: { isActive: true }, orderBy: { sortOrder: 'asc' } }) })))
  18 catalogRouter.get('/brands', asyncHandler(async (_req, res) => res.json({ success: true, data: await prisma.brand.findMany({ where: { isActive: true }, orderBy: { name: 'asc' } }) })))
→ 19 catalogRouter.get('/banners', asyncHandler(async (_req, res) => { const now = new Date(); res.json({ success: true, data: await prisma.banner.findMany(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\catalog.ts:19:123)
[2026-08-31T17:52:08.881Z] INFO Error logger initialised
[2026-08-31T17:52:36.415Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:18)
[2026-08-31T17:52:39.622Z] ERROR PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
PrismaClientInitializationError: 
Invalid `prisma.refreshToken.findUnique()` invocation in
C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:44

  45   res.clearCookie('refreshToken', { path: '/api/auth' })
  46   throw new AppError(401, 'Your session has expired. Please sign in again.')
  47 }
→ 48 const stored = await prisma.refreshToken.findUnique(
Can't reach database server at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`

Please make sure your database server is running at `ep-round-dream-aymm52nx-pooler.c-5.us-east-2.aws.neon.tech:5432`.
    at ei.handleRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:242:13)
    at ei.handleAndLogRequestError (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
    at ei.request (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
    at async a (C:\Users\USER\Desktop\pr\Myokin-beauty\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:833:24)
    at async <anonymous> (C:\Users\USER\Desktop\pr\Myokin-beauty\server\src\routes\auth.ts:48:18)
[2026-08-31T18:22:59.044Z] INFO Error logger initialised
[2026-08-31T18:42:55.432Z] INFO Error logger initialised
[2026-08-31T20:18:33.056Z] INFO Error logger initialised
[2026-08-31T20:18:33.590Z] ERROR ZodError: [
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "DATABASE_URL"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_ACCESS_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_REFRESH_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  }
]
ZodError: [
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "DATABASE_URL"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_ACCESS_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_REFRESH_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  }
]
    at file:///home/fmizykey/backend/dist/config/env.js:13:27
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async Promise.all (index 1)
    at async file:///home/fmizykey/backend/dist/server.js:9:44
[2026-08-31T20:30:43.038Z] INFO Error logger initialised
[2026-08-31T20:30:43.500Z] ERROR ZodError: [
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "DATABASE_URL"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_ACCESS_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_REFRESH_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  }
]
ZodError: [
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "DATABASE_URL"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_ACCESS_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  },
  {
    "expected": "string",
    "code": "invalid_type",
    "path": [
      "JWT_REFRESH_SECRET"
    ],
    "message": "Invalid input: expected string, received undefined"
  }
]
    at file:///home/fmizykey/backend/dist/config/env.js:13:27
    at ModuleJob.run (node:internal/modules/esm/module_job:325:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:606:24)
    at async Promise.all (index 1)
    at async file:///home/fmizykey/backend/dist/server.js:9:44
[2026-08-31T21:05:56.442Z] INFO Error logger initialised
[2026-08-31T21:12:25.913Z] INFO Error logger initialised
[2026-08-31T21:24:43.542Z] INFO Error logger initialised
