-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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(errors): expose custom errors #1816
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/Fb9FjXEVGjJ2q2WjQGEG9oUn8Wk3 |
🎉 This PR is included in version 3.15.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 4.0.0-next.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi, I'm getting the following error when trying to import Prisma adapter and client into my [...nextauth].js file. This happens at runtime when I load any page.
My package.json looks like this:
I've checked in node_modules/ and ./dist/lib/errors.js is definitely being exported. This seems to only happen if I try to use |
please have a look at the closed issues at https://github.com/nextauthjs/adapters |
* chore(deps): add class-properties babel plugin * feat(errors): expand list of custom error classes * build(errors): expose errors as a submodule
What:
Exposes all the custom errors (and adds new ones). under
next-auth/errors
Why:
These errors can be very useful when creating adapters.
How:
Went through the currently available adapters and extracted the types of errors that I thought could be defined as custom errors instead.
Checklist: