Skip to content
New issue

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

Convert errorHandler to return a rejected promise instead of throwing #62

Merged
merged 1 commit into from
Feb 23, 2016

Conversation

daffl
Copy link
Member

@daffl daffl commented Feb 23, 2016

This pull request converts the errorHandler to return a rejected Promise instead of throwing an error. That way everything will still work when mongoose.Promise isn't set to a proper Promise implementation. Otherwise the app will just crash and exit when e.g. a validation error happens.

Closes #61

@ekryski
Copy link
Member

ekryski commented Feb 23, 2016

Yup I think that should be good. :shipit:

@daffl
Copy link
Member Author

daffl commented Feb 23, 2016

Can you merge and make a patch release (error handler is only used internally so it doesn't break any public APIs)?

ekryski added a commit that referenced this pull request Feb 23, 2016
Convert errorHandler to return a rejected promise instead of throwing
@ekryski ekryski merged commit 36a0ec6 into master Feb 23, 2016
@ekryski ekryski deleted the error-reject-61 branch February 23, 2016 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants