aboutsummaryrefslogtreecommitdiff
path: root/google/api_core/operation_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'google/api_core/operation_async.py')
-rw-r--r--google/api_core/operation_async.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/google/api_core/operation_async.py b/google/api_core/operation_async.py
index 17624d6..6bae865 100644
--- a/google/api_core/operation_async.py
+++ b/google/api_core/operation_async.py
@@ -136,11 +136,11 @@ class AsyncOperation(async_future.AsyncFuture):
)
self.set_exception(exception)
else:
- # Some APIs set `done: true`, with an empty response.
- # Set the result to an empty message of the expected
- # result type.
- # https://google.aip.dev/151
- self.set_result(self._result_type())
+ exception = exceptions.GoogleAPICallError(
+ "Unexpected state: Long-running operation had neither "
+ "response nor error set."
+ )
+ self.set_exception(exception)
async def _refresh_and_update(self, retry=async_future.DEFAULT_RETRY):
"""Refresh the operation and update the result if needed.