Autopagination does not throw backend errors appropriately #1373
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Investigating: googleapis/nodejs-datacatalog#296
It seems like, when autoPagination is on, and you throw an error, it does not stop getting resources. To reproduce:
searchAssets.js
in datacatalog (datacatalog has a lot of resources, we're trying to get a large response):Then, in gax (in
pagedApiCaller.ts
,gax-nodejs/src/paginationCalls/pagedApiCaller.ts
Line 91 in 2217633
Add a global counter, and these statements:
It will continue grabbing pages indefinitely.
In addition to fixing this bug, we should add unit tests here.
The text was updated successfully, but these errors were encountered: