Fixed Cloud functions/triggers async rejection crashing server.

This commit is contained in:
Nikita Lutsenko
2016-02-03 01:47:05 -08:00
parent 51dfc62ba8
commit f035307984
3 changed files with 50 additions and 3 deletions

View File

@@ -57,7 +57,8 @@ var getResponseObject = function(request, resolve, reject) {
return resolve(response);
},
error: function(error) {
throw new Parse.Error(Parse.Error.SCRIPT_FAILED, error);
var scriptError = new Parse.Error(Parse.Error.SCRIPT_FAILED, error);
return reject(scriptError);
}
}
};