next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Chapter 15: Error type should be 'CallbackRouteError'

Open shubham-j-sde opened this issue 1 year ago • 4 comments

https://github.com/vercel/next-learn/blob/b7a4366f682163a6643416c9cdf2d9c43d0fc542/dashboard/final-example/app/lib/actions.ts#L130

  1. CredentialsSignin is not an Instance of AuthError
  2. In case of uncaught erros by signIn CallbackRouteError, also as it mentions, one can affirm with stackTrace at [auth][cause]
  3. I have been following this course checked by logging error, the code string is"credentials" for the [cause] and not for the original error, and error.type : 'CallbackRouteError'

Though, even after reading CredentialsSignin docs I am not quite sure how/ where to capture this error.

shubham-j-sde avatar Jun 03 '24 03:06 shubham-j-sde

If you allow, I can solve this bug, raised this ticket to confirm by claims. Thanks

shubham-j-sde avatar Jun 03 '24 03:06 shubham-j-sde

@shubham-j-sde have you found a solution for this?

gmr458 avatar Jun 12 '24 03:06 gmr458

I'm not sure what you are looking for @gmr458, simply the tutorial code needs an update. to replace CredentialsSignin with CallbackRouteError

shubham-j-sde avatar Jun 12 '24 07:06 shubham-j-sde

Hi @shubham-j-sde @gmr458 ,

The cause is the [email protected], upgrade it to [email protected] to fix the issue.

I created a pull request to fix the template: #830 Please upvote my pull request 👍

raylworks avatar Aug 13 '24 06:08 raylworks

Fixed https://github.com/vercel/next-learn/pull/983

leerob avatar Jan 19 '25 15:01 leerob