Instead of using third-party applications or using your own code, there is another way to handle errors like Duplicate Key Error, Mongoose bad ObjectId and others. First create a Class like this:class ErrorResponse extends Error {constructor(messa...
Markdown supported · ⌘↵ to post
No responses yet.