I'm creating a Todo API using JWT and mongoose. I'm almost finishing it, the only part that remains is server side error handling: username or email already exists, there is no connection to the DB, bad request, password is too short and etc.What I want to know is:How do I read and handle those strange mongoose errors.If one of these errors come up, should I send a message to the front end, or a internal code so the front end can generate the message itself.Sorry for my bad english :(
Submitted February 04, 2018 at 05:11PM by masterjohn17
No comments:
Post a Comment