小编ble*_*per的帖子

驱动器 API 文件修补方法失败,并显示“先决条件失败”“conditionNotMet”

似乎一夜之间 Google Drive API 方法 files().patch( , ).execute() 停止工作并抛出异常。如果您“尝试一下”,通过 Google 的参考页面https://developers.google.com/drive/v2/reference/files/patch也可以观察到这个问题。

异常响应是:

500 Internal Server Error

cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  162
content-type:  application/json; charset=UTF-8
date:  Thu, 22 Aug 2013 12:32:06 GMT
expires:  Thu, 22 Aug 2013 12:32:06 GMT
server:  GSE

    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "conditionNotMet",
        "message": "Precondition Failed",
        "locationType": "header",
        "location": "If-Match"
       }
      ],
      "code": 500,
      "message": "Precondition Failed"
     }
    }
Run Code Online (Sandbox Code Playgroud)

这确实影响了我们的应用程序。

google-app-engine google-drive-api

5
推荐指数
1
解决办法
1270
查看次数