Skip to content

Commit bb2198e

Browse files
fix: wrong prisma error code for duplicate codeChallenge
Co-authored-by: Copilot <[email protected]>
1 parent 0a00391 commit bb2198e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web/src/server/modules/auth/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const emailLogin = async ({
4141
} catch (error) {
4242
if (
4343
error instanceof Prisma.PrismaClientKnownRequestError &&
44-
error.code === 'P2025'
44+
error.code === 'P2002'
4545
) {
4646
// That means a duplicate code challenge was with the same email
4747
throw new TRPCError({

0 commit comments

Comments
 (0)