Error thrown during batchUpdate for createImageRequest

308 views Asked by At

While using Google Slides API request for batchUpdate request (ref: https://developers.google.com/slides/reference/rest/v1/presentations/request#createimagerequest), even when all images are valid, the library still throws this error, and it has been quite difficult to debug what exactly went wrong. I ensured image to be valid and matched requirements through Google API specs.

If there are better ways to catch specific details, please mention.

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)

And error object looks like:

 {
  "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

There are 0 answers