express-mongoose-es6-rest-api
express-mongoose-es6-rest-api copied to clipboard
Error handling and mongoose validation errors
During development it is useful to see the full error reported by mongoose. E.g. you forget to assign a required parameter.
At the moment I only get ValidationError: MyModel validation failed and a useless stack trace (all methods are part of the error handling module).
Mongoose adds details in the err.errors property.
What would be the best way to get these error details through the error handling process (in APIErrors.js)?
Same problem here
This is a large eyesore for me, does anyone have an idea how to handle this?
I agree with everyone here. I tried to add correct stacktrace but ran out of time and was assigned to diff project.
+1
@KunalKapadia do you have any suggestions how to proceed?