DEV Community

Discussion on: Auth in Nuxt for 5 years old

Collapse
 
jpliukaitis profile image
jpliukaitis

res.status(500).json('Incorrect password')

I would recommend you to change 500 error to 422 error (Validation) in case of bad password or non existing user, as 500 errors should only come up when your server encoutners unexpected conditions and can not fulfill request.

Collapse
 
aneesshameed profile image
aneesshameed

Ah, thanks for the tip. Updated the same. :D