在batchUpdate期间为createImageRequest抛出错误

时间:2017-01-03 13:04:44

标签: google-slides google-slides-api

使用Google幻灯片API请求批处理更新请求(参考:https://developers.google.com/slides/reference/rest/v1/presentations/request#createimagerequest)时,即使所有图像都有效,该库仍然会抛出此错误,并且很难调试出现了什么问题。我通过Google API规范确保图片有效且符合要求。

如果有更好的方法来捕捉具体细节,请提及。

Error: Invalid requests[224].updatePageProperties: There was a problem retrieving the specified image.
    at Request.DefaultTransporter.wrapCallback_ [as _callback] (/path/to/project/node_modules/google-auth-library/lib/transporters.js:85:15)
    at Request.init.self.callback (/path/to/project/node_modules/request/request.js:186:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.readResponseBody (/path/to/project/node_modules/request/request.js:1081:10)
    at Request.EventEmitter.emit (events.js:95:17)
    at IncomingMessage.Request.onRequestResponse (/path/to/project/node_modules/request/request.js:1001:12)
    at IncomingMessage.g (events.js:180:16)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

错误对象如下:

 {
  "cause": {
    "code": 400,
    "errors": [
      {
        "message": "Invalid requests[224].updatePageProperties: There was a problem retrieving the specified image.",
        "domain": "global",
        "reason": "badRequest"
      }
    ]
  },
  "isOperational": true,
  "code": 400,
  "errors": [
    {
      "message": "Invalid requests[224].updatePageProperties: There was a problem retrieving the specified image.",
      "domain": "global",
      "reason": "badRequest"
    }
  ]
} 

0 个答案:

没有答案