我正在连接到Facebook API并收到此错误
{ [Error: failed [500] {"error":{"message":"Invalid parameter","type":"FacebookApiException","code":100,"error_subcode":1349125,"is_transient":false,"error_user_title":"Missing Message Or Attachment","error_user_msg":"Missing message or attachment."}}] stack: [Getter] }
我想收到error_user_msg
try {
var response = Social.createPosting(graphType, data);
} catch (exception) {
console.log(exception)
throw new Meteor.Error(exception.error_user_msg)
}
问题仅在于返回的message
对象上定义了Error
属性。
exception.message
返回
failed [500] {"error":{"message":"Invalid parameter","type":"FacebookApiException","code":100,"error_subcode":1349125,"is_transient":false,"error_user_title":"Missing Message Or Attachment","error_user_msg":"Missing message or attachment."}}
哪个是String
,但是无效的JSON,所以我无法解析它
我错过了什么?