I'm using Google Videointelligence API and according the documentation of the Quota & Limits, I can process ~3 videos parallel (and it works fine), but when I process more then 3 videos in parallel, exception was thrown.
The issue is that I can't catch this exception!
The exception: (node:31660) UnhandledPromiseRejectionWarning: Error: 8 RESOURCE_EXHAUSTED: Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'videointelligence.googleapis.com' for consumer 'project_number:852521347926'.
I'm writing in node.js.
the code is just like the example:
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
}