I'm trying to use Parse Cloud to save some changes to the current logged in user, but for some reason it results in response.error().
I have reduced my code to this snippet just for testing purposes.
Parse.Cloud.define("createGroup", function(request, response) {
var currentUser = Parse.User.current();
currentUser.set("currentGroupId", "test");
currentUser.save(null, {
success: function(currentUser){
response.success();
},
error: function(error){
response.error("error " + error);
}
});
});
The error log message says error [object Object].
I really have no idea what is wrong with my code, I'd appreciate any help.