Where to find PrismaClientKnownRequestError with the new generated client

I cannot find the right place to import PrismaClientKnownRequestError from with the new version. This is my schema:
datasource db {
provider = "sqlite"
url = env("PRISMA_DATABASE_URL")
}

generator client {
provider = "prisma-client"
output = "../src/generated/prisma"

previewFeatures = ["driverAdapters", "queryCompiler"]
}

model User {
id String @id @default(uuid())
name String
email String @unique
}
datasource db {
provider = "sqlite"
url = env("PRISMA_DATABASE_URL")
}

generator client {
provider = "prisma-client"
output = "../src/generated/prisma"

previewFeatures = ["driverAdapters", "queryCompiler"]
}

model User {
id String @id @default(uuid())
name String
email String @unique
}
- import { Prisma } from "@prisma/client"; does not exist - The generated client does not expose the type in a public way - The only place I can get it from is import { PrismaClientKnownRequestError } from "~/generated/prisma/internal/prismaNamespace"; which seems to be wrong, it is depending on internals How do I do this?
2 Replies
Prisma AI Help
Prisma AI Help6mo ago
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!
roguehusky3
roguehusky3OP6mo ago
I got it

Did you find this page helpful?