我正在使用 Microsoft Graph。我尝试添加两个附件
POST /me/messages/{messageId}/attachment
{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "1.txt",
"contentBytes": "SGVsbG8gd29ybGQh"
}
POST /me/messages/{messageId}/attachment
{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "2.txt",
"contentBytes": "SGVsbG8gd29ybGQhIQ=="
}
它给了我412(前提条件失败)当我同时添加这两个附件时出错。
{
"code": "ErrorIrresolvableConflict",
"message": "The send or update operation could not be performed because the change key passed in the request does not match the current change key for the item., Cannot save changes made to an item to store.SaveStatus: IrresolvableConflict\r\nPropertyConflicts:\r\n",
"innerError": {
"request-id": "20e95141-5d2d-41e3-8eed-3bbd24bcf52a",
"date": "2017-11-28T07:18:45"
}
}
现在,解决方法是将第二个 POST 延迟大约 100 毫秒。如果小于100毫秒,失败的可能性就更大。 (失败的几率也可能与附件的大小有关,我没有做进一步的测试)
但如果我有 10 个附件,每两次 POST 之间就会有 100 毫秒的延迟。
顺便说一句,我看到这个问题甚至存在于 Outlook 客户端中,当人们发送邮件时,他们得到了同样的错误:检查here https://answers.microsoft.com/en-us/msoffice/forum/msoffice_outlook-mso_mac-mso_mac2016/error-19761-when-sending-mail-the-send-or-update/8b9d8c7d-18ac-4543-ab7e-f51d92847bd5?auth=1。所以这可能是服务器问题。
[只需从我原来的问题转移到答案]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)