Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not throw error on empty LRO response #257

Closed
TrucHLe opened this issue Aug 18, 2021 · 1 comment · Fixed by #258
Closed

Do not throw error on empty LRO response #257

TrucHLe opened this issue Aug 18, 2021 · 1 comment · Fixed by #258
Assignees
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.

Comments

@TrucHLe
Copy link

TrucHLe commented Aug 18, 2021

operation.py throws an error if an LRO finishes but returns an empty response (the error message that it throws is "Unexpected state: Long-running operation had neither response nor error set"). However some APIs, such as Contact Center Insights, end LRO without setting either result or error (but set done: true). For example, please see ExportInsightsDataResponse which is an empty response that is returned after the ExportInsightsData LRO is complete.

We should update operation.py to return an empty response instead of an error when it encounters an empty LRO. For reference, we found a similar issue in the NodeJS operation library and it was fixed here.

@busunkim96 busunkim96 added 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. labels Aug 18, 2021
@busunkim96 busunkim96 self-assigned this Aug 18, 2021
@busunkim96
Copy link
Contributor

Hi @TrucHLe,

I've opened a PR I believe will resolve the issue in #258. If you want to try it locally you can install it straight from the branch:

pip install git+https://github.com/googleapis/python-api-core.git@fix-empty-LROs

Thank you for providing a link to the NodeJS PR (and linking your sample PR)! Both were super helpful for understanding the issue. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants