0

在使用 Google Slides API 请求进行 batchUpdate 请求时(参考: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"
    }
  ]
} 
4

0 回答 0