Google App Script UrlFetchApp frequent “address unavailable” error

喜你入骨 提交于 2020-01-15 06:29:05

问题


I'm using UrlFetchApp for API requests.

     var url = "https://api.bol.com/catalog/v4/search/?....
     var response = UrlFetchApp.fetch(url);

I need to make 1 API request for each item (unfortunately no way around that).

With few items I don't seem to have a problem. When I have over 20 items I often get an "address unavailable" error.

I only have this issue when using Google Spreadsheets, so I'm quite sure the problem lies there. From my server I can do hundreds of requests in a row without issue.

I've tried putting in a delay with using Utilities.sleep to slow down the request rate. That doesn't seem to be the issue.

How to get rid of this error?

来源:https://stackoverflow.com/questions/44831451/google-app-script-urlfetchapp-frequent-address-unavailable-error

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