How to throw custom error message from authorize() instead of "CallbackRouteError"
Unanswered
iC0d3X posted this in #help-forum
iC0d3XOP
Hello,
I'm using Auth.js (5.0.0-beta.4) and wanted to know if it's possible to throw custom error messages in the authorize instead of "CallbackRouteError".
This throws
I'm using Auth.js (5.0.0-beta.4) and wanted to know if it's possible to throw custom error messages in the authorize instead of "CallbackRouteError".
async authorize(credentials) {
if(!credentials) {
throw new Error("TESTTEST");
}
}This throws
CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror.