Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prisma): import PrismaClientKnownRequestError for edge runtime compatibility #12755

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

twinh
Copy link

@twinh twinh commented Mar 10, 2025

☕️ Reasoning

Previously, PrismaClientKnownRequestError was imported from @prisma/client/runtime/library,

which is intended for Node.js and causes a runtime error ("TypeError: Cannot read properties of undefined (reading 'exec')") in edge environments.

This change imports it from @prisma/client to ensure proper functionality in edge runtime.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes #12731

📌 Resources

@twinh twinh requested a review from ndom91 as a code owner March 10, 2025 09:02
Copy link

vercel bot commented Mar 10, 2025

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 Mar 10, 2025 9:05am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Mar 10, 2025 9:05am

Copy link

vercel bot commented Mar 10, 2025

@twinh 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 Mar 10, 2025
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
1 participant