在电子邮件迁移时获取conditionNotMet错误> 32kb大小

时间:2013-07-17 17:38:18

标签: gmail google-apps google-admin-sdk google-email-migration

我已成功使用Google Email Migration API v2迁移小型测试消息。但是,在迁移较大的邮件时,我收到如下错误:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "conditionNotMet",
    "message": "Limit reached.",
    "locationType": "header",
    "location": "If-Match"
   }
  ],
  "code": 412,
  "message": "Limit reached."
 }
}

我开始偶尔注意到32kb大小的消息错误。大小约为40kb时,错误变得一致(没有消息成功)。我已确认无论是google-api-python-client使用my non-standard discovery document还是OAuth 2.0 playground,都会出现错误。以下是对消息的成功调用和响应< 32kb看起来像:

POST /upload/email/v2/users/jay@ditoweb.com/mail?uploadType=multipart HTTP/1.1
Host: www.googleapis.com
Content-length: 6114
Content-type: multipart/related; boundary="part_boundary"
Authorization: Bearer <removed>
--part_boundary
Content-Type: application/json; charset=UTF-8

{
 'isInbox': 'true',
 'isUnread': 'true'
}

--part_boundary
Content-Type: message/rfc822

From: <admin@jay.powerposters.org>
To: <admin@jay.powerposters.org>
Subject: test growing message sizes
Date: Wed, 17 Jul 2013 10:40:48 -0400

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<last line repeated ~50 times>
--part_boundary--


HTTP/1.1 204 No Content
Content-length: 0
Via: HTTP/1.1 GWA
X-google-cache-control: remote-fetch
Server: HTTP Upload Server Built on Jul 8 2013 15:32:26 (1373322746)
Etag: "S82oyh6kQMvIt9YE14Ogc8RmmsQ/vyGp6PvFo4RvsFtPoIWeCReyIC8"
Date: Wed, 17 Jul 2013 17:35:13 GMT

这是~150kb的失败消息:

POST /upload/email/v2/users/admin@jay.powerposters.org/mail?uploadType=multipart HTTP/1.1
Host: www.googleapis.com
Content-length: 189946
Content-type: multipart/related; boundary="part_boundary"
Authorization: Bearer <removed>
--part_boundary
Content-Type: application/json; charset=UTF-8

{
 'isInbox': 'true',
 'isUnread': 'true'
}

--part_boundary
Content-Type: message/rfc822

From: <admin@jay.powerposters.org>
To: <admin@jay.powerposters.org>
Subject: test growing message sizes
Date: Wed, 17 Jul 2013 10:40:48 -0400

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<last line repeated ~1500 times>

--part_boundary--


HTTP/1.1 412 Precondition Failed
Content-length: 240
Via: HTTP/1.1 GWA
X-google-cache-control: remote-fetch
Server: HTTP Upload Server Built on Jul 8 2013 15:32:26 (1373322746)
Date: Wed, 17 Jul 2013 16:57:23 GMT
Content-type: application/json
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "conditionNotMet",
    "message": "Limit reached.",
    "locationType": "header",
    "location": "If-Match"
   }
  ],
  "code": 412,
  "message": "Limit reached."
 }
}

1 个答案:

答案 0 :(得分:0)

谷歌已经解决了这个问题。我现在可以迁移各种规模的邮件。