node.js - Google Videointelligence API - UnhandledPromiseRejectionWarning,每分钟请求数
问题描述
我正在使用 Google Videointelligence API 并根据配额和限制的文档,我可以并行处理约 3 个视频(并且工作正常),但是当我并行处理超过 3 个视频时,会引发异常。
问题是我无法捕捉到这个异常!
例外:(节点:31660)UnhandledPromiseRejectionWarning:错误:8 RESOURCE_EXHAUSTED:配额指标“请求”超出配额,并限制消费者“project_number:852521347926”的服务“videointelligence.googleapis.com”的“每分钟请求数”。
我在 node.js 中写作。
代码就像示例一样:
const [operation] = await client.annotateVideo(request);
logger.debug('Waiting for enrichment operation to complete...');
try{
const [operationResult] = await operation.promise(); //Exception was thrown on this line
}catch(err){
console.log("exception was caught");//failed to catch the exception
}
解决方案
推荐阅读
- java - javax.net.ssl.SSLHandshakeException 在使用自定义 java 运行时映像时发生,但并非没有
- r - R:时间序列在数据集中按顺序绘制年份和观察结果
- c# - 尝试创建新的 SharePoint 列表项时出现 Microsoft Graph SDK 错误
- python - 如何有效地使用 numpy 随机选择来改变权重列表
- laravel - 在插入数据库 larav 之前将儒略日期转换为公历
- javascript - Bootstrap 4.6 折叠不切换(打开或关闭)
- javascript - 只需单击几下即可创建包含所有必要文件的组件目录
- python - FASTApi 和 nginx 缺少静态路径
- informatica - Informatica BDM 映射/应用程序的问题
- php - Magento 2 注册回调 URL / webbook,例如添加到购物车,无需在 Magento 中更改代码