var MESSAGE_CLASS = 'Message';
Parse.Cloud.afterSave(MESSAGE_CLASS, function(req) {
console.log('---- AFTER SAVE RECORD', req);
});
What you expected to happen.
trigger run the same way if i used an other name of class like Post
warn: Making outgoing webhook request without webhookKey being set!
error: afterSave failed for Message for user G2YgGfjRJq:
Input: {"body":"Hello","sender":{"__type":"Pointer","className":"_User","objectId":"G2YgGfjRJq"},"conversation":{"__type":"Pointer","className":"Conversation","objectId":"yA7ZPoTegl"},"createdAt":"2018-05-30T16:29:34.517Z","updatedAt":"2018-05-30T16:29:34.517Z","objectId":"AK6IoJApy3"}
Error: {"code":141,"message":{}} className=Message, triggerType=afterSave, code=141, , user=G2YgGfjRJq
info: afterSave triggered for Message for user G2YgGfjRJq:
Input: {"body":"Hello","sender":{"__type":"Pointer","className":"_User","objectId":"G2YgGfjRJq"},"conversation":{"__type":"Pointer","className":"Conversation","objectId":"yA7ZPoTegl"},"createdAt":"2018-05-30T16:29:34.517Z","updatedAt":"2018-05-30T16:29:34.517Z","objectId":"AK6IoJApy3"} className=Message, triggerType=afterSave, user=G2YgGfjRJq
warn: afterSave caught an error code=141,
verbose: RESPONSE from [POST] /parse/classes/Message: {
"status": 201,
"response": {
"objectId": "AK6IoJApy3",
"createdAt": "2018-05-30T16:29:34.517Z"
},
"location": "http://localhost:1337/parse/classes/Message/AK6IoJApy3"
} status=201, objectId=AK6IoJApy3, createdAt=2018-05-30T16:29:34.517Z, location=http://localhost:1337/parse/classes/Message/AK6IoJApy3
Issue Description
afterSave trigger is not working if the name of class is Message
Steps to reproduce
Expected Results
What you expected to happen.
trigger run the same way if i used an other name of class like Post
Actual Outcome
An error is thrown, and the afterSave trigger not executed
Environment Setup
Server
Database
Logs/Trace