问题描述
我正在研究Google Presentation的生成,有时batchUpdate会引发错误:
I'm working on generation of Google Presentation and sometimes batchUpdate throws the error:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
推荐答案
问题:
您的请求正文很大.您需要通过一个呼叫来请求演示文稿中的许多更新.由于出现500错误,因此服务器在处理大量请求时很可能出现问题.
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.
这肯定不是写入请求限制的问题,因为您只制作了一个(大)写入请求(并且HTTP状态也不是适当的状态).
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).
无论如何,我建议您将通话分为多个必要部分,以免出现此错误.将请求分为不同的请求主体,并连续多次调用 batchUpdate 时代.这应该可以解决您的问题.
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.
- presentations.batchUpdate
- Slides API: Usage Limits
- 500 Internal Server Error
这篇关于方法presentations.batchUpdate抛出“遇到内部错误".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!