1
我试图运行我的解析云代码作业,但它运行时出现错误。当它遇到这个错误时,它运行function(error)
并打印出Got an error undefined : undefined
。Javascript错误函数将错误消息记录为'undefined'
由于error
宝贵的是未定义的,我很难找出它正在运行的功能之一是导致问题,以及该功能失败的地方。有什么我可以登录status.error
看看有什么问题吗?
Parse.Cloud.job("MCBackground", function(request, status) {
// ... other code to setup usersQuery ...
Parse.Cloud.useMasterKey();
var usersQuery = new Parse.Query(Parse.User);
return usersQuery.each(function(user) {
return processUser(user)
.then(function(eBayResults) {
return mcComparison(user, eBayResults);
});
})
.then(function() {
// Set the job's success status
status.success("MatchCenterBackground completed successfully.");
}, function(error) {
// Set the job's error status
status.error("Got an error " + error + " : " + error.message);
});
});
奇怪的是,如果误差是不确定的,则返回Error.message应该引起类似的异常“遗漏的类型错误:无法读取的未定义的属性‘消息’” –
我的想法完全吻合。很奇怪的东西。 – TheDudeGuy