Skip to content

deleteOne in a transaction bug #7857

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

Closed
anasqadrei opened this issue May 31, 2019 · 0 comments · Fixed by #7860
Closed

deleteOne in a transaction bug #7857

anasqadrei opened this issue May 31, 2019 · 0 comments · Fixed by #7860
Milestone

Comments

@anasqadrei
Copy link

When I use deleteOne in a transaction, it aborts and gives me this error:

(node:42891) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongooseError: Callback must be a function, got [object Object]
(node:42891) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

However, it works fine with deleteMany

This is the gist to reproduce the problem.

I'm using Node.js 8.9.3, Mongoose 5.5.11 and MongoDB 4.0.9 on Atlas

Fonger added a commit to Fonger/mongoose that referenced this issue Jun 2, 2019
Fonger added a commit to Fonger/mongoose that referenced this issue Jun 2, 2019
@vkarpov15 vkarpov15 added this to the 5.5.13 milestone Jun 3, 2019
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 a pull request may close this issue.

2 participants