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.
1 parent 29de85b commit 9866f71Copy full SHA for 9866f71
packages/adapter-prisma/src/index.ts
@@ -15,7 +15,7 @@
15
*
16
* @module @auth/prisma-adapter
17
*/
18
-import { Prisma, type PrismaClient } from "@prisma/client"
+import type { PrismaClient } from "@prisma/client"
19
import type {
20
Adapter,
21
AdapterAccount,
@@ -89,7 +89,9 @@ export function PrismaAdapter(
89
// If token already used/deleted, just return null
90
// https://www.prisma.io/docs/reference/api-reference/error-reference#p2025
91
if (
92
- error instanceof Prisma.PrismaClientKnownRequestError &&
+ error &&
93
+ typeof error === "object" &&
94
+ "code" in error &&
95
error.code === "P2025"
96
)
97
return null
0 commit comments