express-mongoose-es6-rest-api icon indicating copy to clipboard operation
express-mongoose-es6-rest-api copied to clipboard

Error handling and mongoose validation errors

Open simonschllng opened this issue 8 years ago • 5 comments
trafficstars

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)?

simonschllng avatar Dec 19 '16 11:12 simonschllng

Same problem here

duard avatar Oct 11 '17 12:10 duard

This is a large eyesore for me, does anyone have an idea how to handle this?

mxmzb avatar Nov 17 '17 22:11 mxmzb

I agree with everyone here. I tried to add correct stacktrace but ran out of time and was assigned to diff project.

okonon avatar Nov 18 '17 14:11 okonon

+1

arikogan avatar Nov 23 '17 11:11 arikogan

@KunalKapadia do you have any suggestions how to proceed?

okonon avatar Nov 28 '17 04:11 okonon