← Back to Changelog

Catch more database driver errors in Prisma ORM

April 27, 2026
PrismaPrisma ORM

Prisma ORM now surfaces unmapped database driver errors as a catchable P2039 error instead of crashing the client. This week also ships a MongoDB setup fix and patched bundled dependencies.

Highlights

ImprovedPrisma ORM surfaces unmapped driver errors as catchable errors

When a database driver returned an error Prisma ORM had no specific mapping for, the raw driver error was rethrown and could crash the client. These now surface as a user-facing P2039, so you can catch and handle them like any other Prisma error.

try {
  await prisma.user.findMany();
} catch (error) {
  if (error instanceof Prisma.PrismaClientKnownRequestError && error.code === "P2039") {
    // Unmapped driver error: log and handle instead of crashing.
  }
}

Shipped in prisma/prisma#29512.

Prisma ORM

Prisma ORM fixes MongoDB replica set setup and patches bundled dependencies.

Fixed
  • Prisma ORM MongoDB replica set initialization is idempotent in the Docker setup, so re-running it no longer errors. (prisma/prisma#29515)

Security: Prisma ORM updates bundled dependencies (hono, ajv, uuid) to patch known advisories. (prisma/prisma#29514)


Need help applying these changes in production? Prisma Enterprise Support can help with schema design, performance, security, and compliance.