Closed
Description
Issue Description
If afterSave hook throws an exception, it is reported to the user that saving the object failed, although the object is saved.
Steps to reproduce
Parse.Cloud.afterSave("MyObject", function (request) {
throw "Exception";
//client gets the error reported although the MyObject instance IS saved
});
Expected Results
From docs: "The client will receive a successful response to the save request after the handler terminates, regardless of how it terminates."
Actual Outcome
The client receives an error response.
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : 2.5.3
- Operating System: WINDOWS
- Localhost or remote server? LOCAL
-
Database
- MongoDB: MLAB.COM
Logs/Trace
info: beforeSave triggered for MyObject for user wFyTH5Gb0I:
Input: { .. some data .. }
Result: { .. some data .. }
error: Error generating response. 'Exception' error=Exception
error: Uncaught internal server error. Exception
Exception
Could someone please test that the issue is not just in my environment? Thanks!