We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PrismaClientKnownRequestError
1 parent 6a0fa0c commit c7409f3Copy full SHA for c7409f3
packages/adapter-prisma/src/index.ts
@@ -15,8 +15,7 @@
15
*
16
* @module @auth/prisma-adapter
17
*/
18
-import { type PrismaClient } from "@prisma/client"
19
-import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library"
+import { Prisma, type PrismaClient } from "@prisma/client"
20
import type {
21
Adapter,
22
AdapterAccount,
@@ -90,7 +89,7 @@ export function PrismaAdapter(
90
89
// If token already used/deleted, just return null
91
// https://www.prisma.io/docs/reference/api-reference/error-reference#p2025
92
if (
93
- error instanceof PrismaClientKnownRequestError &&
+ error instanceof Prisma.PrismaClientKnownRequestError &&
94
error.code === "P2025"
95
)
96
return null
0 commit comments