-
Notifications
You must be signed in to change notification settings - Fork 2.1k
adapter-ppg doesn't handle nullable DateTime, it failes on normalize_timestamp with null access (.replace) #29190
Copy link
Copy link
Closed
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.
Description
Bug description
Error
https://github.com/prisma/prisma/blob/main/packages/adapter-ppg/src/conversion.ts#L289
TypeError: Cannot read properties of null (reading 'replace')
at Object.normalize_timestamp [as parse] (node_modules/@prisma/adapter-ppg/dist/index.mjs:284:18)
at node_modules/@prisma/ppg/dist/index.js:1055:28
at Array.map (<anonymous>)
at parseSessionRow (node_modules/@prisma/ppg/dist/index.js:1052:28)
at node_modules/@prisma/ppg/dist/index.js:1024:67
at Object.collect (node_modules/@prisma/ppg/dist/index.js:86:22)
at processTicksAndRejections (node:internal/process/task_queues:103:5)
at executeQueryRaw (node_modules/@prisma/adapter-ppg/dist/index.mjs:546:18)
at e.interpretNode (node_modules/@prisma/client-engine-runtime/src/interpreter/query-interpreter.ts:182:26)
at e.interpretNode (node_modules/@prisma/client-engine-runtime/src/interpreter/query-interpreter.ts:209:41)
Severity
Reproduction
Expected vs. Actual Behavior
not error
Frequency
Consistently reproducible
Does this occur in development or production?
Only in development (e.g., CLI tools, migrations, Prisma Studio)
Is this a regression?
pre prisma 7, using prisma adapter because adopted prisma cloud on vercel and becoming a hassle
Workaround
not easlily its a giant pain
Prisma Schema & Queries
Job {
/// Timestamp when execution completed
/// @column completed_at
completedAt DateTime? @map("completed_at") // 🔥
}Prisma Config
// Add your `prisma.config.ts`Logs & Debug Info
// Debug logs here
Environment & Setup
- OS:
- Database:
- Node.js version:
Prisma Version
7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.