Next.js Discord

Discord Forum

error handling next auth in app dir

Unanswered
Inca Dove posted this in #help-forum
Open in Discord
Inca DoveOP
i have 2 seperate project, both using next auth, different is one using pages/api folder and my new project is using route handler
im using credentials strategy for both of them

but the error handling its pretty strange:
- for the pages/api folder, it haves 401 unauthorized when wrong id or password
- at the route handler, it only have 200

is there something to add on on the route handler so error handling like pages/api?

0 Replies