The method presentations.batchUpdate throws “Internal error encountered”

时光毁灭记忆、已成空白 提交于 2020-03-25 13:44:07

问题


I'm working on generation of Google Presentation and sometimes batchUpdate throws the error:

{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

Here's the example of the request body


回答1:


Issue:

Your request body is huge. You are requesting many updates in the presentation with a single call. Since you are getting a 500 error, the server is most likely having problems while processing this huge amount of requests.

It's certainly not a question of write request limits, since you are only making one single (large) write request (and HTTP status is not the appropriate one either).

Solution:

In any case, I would suggest you to split your call into as many parts as necessary so that you never get this error. Group the requests into different request bodies and call batchUpdate several successive times. This should fix your problem.

Reference:

  • presentations.batchUpdate
  • Slides API: Usage Limits
  • 500 Internal Server Error


来源:https://stackoverflow.com/questions/60226544/the-method-presentations-batchupdate-throws-internal-error-encountered

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!