We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a open discussion about a particular line of code of the library:
beautify( error, collection, values, messages, options.defaultMessage ) .then(next) .catch(function (beautifyError) { setTimeout(function () { throw new Error( 'mongoose-beautiful-unique-validation error: ' + beautifyError.stack ); }); });
When beautify fails, its send a global error within a setTimeout() instead of propagating the error. Which lead to a crash.
Is this feature strongly required by this library, or should we just call next(aNewError) like this?
beautify( error, collection, values, messages, options.defaultMessage ) .then(next) .catch((beautifyError) => next(beautifyError) ); });
The text was updated successfully, but these errors were encountered:
Closing this and proposing a pull-request instead
Sorry, something went wrong.
No branches or pull requests
This is a open discussion about a particular line of code of the library:
When beautify fails, its send a global error within a setTimeout() instead of propagating the error. Which lead to a crash.
Is this feature strongly required by this library, or should we just call next(aNewError) like this?
The text was updated successfully, but these errors were encountered: