I have a simple function in Parse Cloud Code (with express.js), but I'm having trouble understanding the propagation of Parse.Promise.error()
in this context. When I hit the function, it returns nothing and the console says "success/error was not called." Shouldn't the error be caught?
app.post('/test', function(req, res) {
var TestObject = Parse.Object.extend('TestObject');
query = new Parse.Query(TestObject);
query.first().then(function(rr) {
return Parse.Promise.error();
res.send('should not reach this');
}, function(error) {
res.send('error');
});
});