Hello
I have parse server on AWS.
I’m trying to modify existing user through Cloud Code, but I keep getting an error 141.
The same function works fine from the website.
Basic hello function works just fine in the app.
I’ve run out of ideas what the problem might be
Here is my code:
local toInsert = {["objectId"] = parameter.objectId ,["username"] = val.emailStud} local function onRun( event ) if not event.error then print( "on run ", event.response.value ) else print( "on error ", event.error) end end parse:run( "modifyUser", toInsert, onRun )
And cloud code function:
Parse.Cloud.define('modifyUser', function(request, response) { Parse.Cloud.useMasterKey(); var user = new Parse.User(); var query = new Parse.Query(Parse.User); query.equalTo("objectId", request.params.objectId); query.first({ success: function(object) { object.set("username", request.params.username); object.save(); // Set the job's success status response.success("Success Message"); }, error: function(error) { // Set the job's error status response.error(request.params.objectId ); } }); });