Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
I am aware what causes the VersionError
and also checked other issues where people reported a null value for the document in the error-handling middleware. My question is a combination of these, perhaps more of a general one: why does a VersionError on a .save()
not make the document available in the middleware? Is it an intentional decision?
I have checked the source code here:
Line 535 in f3ab650
Also went through other cases where the callback is invoked with the document and other places it's not. How is this determined? I have some code in an error-handling middleware which depends on the document being available, hence wanted to know what to expect.