Node.js: How to get the incorrect fields in the Error object Node.js: How to get the incorrect fields in the Error object mongoose mongoose

Node.js: How to get the incorrect fields in the Error object


I would check if the fields are empty BEFORE you try to run into a failure and extract data from an error message, which may fail on unknown errors.