monitoring.listTimeSeries silently ignores exeuctionErrors in response if autoPaginate is true #1455
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.
When using the
monitoring.listTimeSeries
method, the default calloption specifiesautoPaginate: true
. In this mode, the call is wired up with gax in a way that its pagination code ignores response fields other than the response item list and the next page token.In this API method, however, there's an important field called
executionErrors
, which can contain errors like:In extreme cases, this method can return 0 results due to these underlying problems.
There's a clear solution here of course, I can manage paging myself and then I can inspect this field and act accordingly.
However, this can easily cause problems for developers not fully aware of this field and the internals of how gax manages auto-paging.
There can be multiple ways the library could handle these problems:
I understand that the API side of this service made the decision to return partial errors, so that the clients can decide if they are happy with the partial results or retry if not. However, as a developer calling this API with this client library, I would prefer a default where I can be sure that the results are complete if no errors was thrown.
I also understand that the development of such a feature would likely need extensions in the underlying gax library too.
The text was updated successfully, but these errors were encountered: