matteodelabre / mongoose-beautiful-unique-validation

Plugin for Mongoose that turns duplicate errors into regular Mongoose validation errors
MIT License
117 stars 38 forks source link

Avoid throwing a global error, instead transmit it to the middleware #53

Open bdelville opened 6 years ago

bdelville commented 6 years ago

Using setTimeout to transfer middleware error leads to uncontrolled request return and instability