Skip to content

fix(adapters): handle P2025 errors without importing Prisma namespace#13061

Merged
ThangHuuVu merged 2 commits into
nextauthjs:mainfrom
karl-barbour:main
Jun 22, 2025
Merged

fix(adapters): handle P2025 errors without importing Prisma namespace#13061
ThangHuuVu merged 2 commits into
nextauthjs:mainfrom
karl-barbour:main

Conversation

@karl-barbour

@karl-barbour karl-barbour commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

☕️ Reasoning

A bug relating to importing Prisma from a custom output raised in #13060 seems to be caused by previous PR #12755 where functionality was changed to import the error class PrismaClientKnownRequestError from the Prisma namespace.

As we are only looking for code P2025 (defined here) we do not need to import the full client.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes: #13060 #13035

📌 Resources

@karl-barbour karl-barbour requested a review from ndom91 as a code owner June 20, 2025 14:08
@vercel

vercel Bot commented Jun 20, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2025 10:39am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Jun 22, 2025 10:39am

@vercel

vercel Bot commented Jun 20, 2025

Copy link
Copy Markdown

@karl-barbour is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added adapters Changes related to the core code concerning database adapters prisma @auth/prisma-adapter labels Jun 20, 2025
@codecov

codecov Bot commented Jun 22, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.42%. Comparing base (29de85b) to head (0dc3df3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13061   +/-   ##
=======================================
  Coverage   39.41%   39.42%           
=======================================
  Files         200      200           
  Lines       31780    31782    +2     
  Branches     1393     1399    +6     
=======================================
+ Hits        12527    12529    +2     
  Misses      19253    19253           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ThangHuuVu

Copy link
Copy Markdown
Contributor

Thanks for the fix!

@ThangHuuVu ThangHuuVu merged commit 9866f71 into nextauthjs:main Jun 22, 2025
12 of 14 checks passed
@yusifaliyevpro

Copy link
Copy Markdown

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adapters Changes related to the core code concerning database adapters prisma @auth/prisma-adapter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prisma adapter does not work with custom output path

3 participants