On a rare occasion MultipleIndexBatchIndexingResponse instance's wait call throws AttributeError 'int' object has no attribute 'items'. This is caused by get_items trying to iterate over self.raw_response["taskID"] which for some reason is an int.
def wait(self, request_options=None):
# type: (Optional[Union[RequestOptions, dict]]) -> MultipleIndexBatchIndexingResponse # noqa: E501
while not self._done:
for index_name, task_id in get_items(self.raw_response["taskID"]): # <--------
self._client._sync().wait_task(index_name, task_id, request_options)
self._done = True
return self
Steps To Reproduce
I honestly don't know how to trigger this behavior. Apparently the API allows mixed types in the taskID field (int or object) which causes this behavior - how to trigger the API to respond with an int there is unknown to me.
Description
On a rare occasion
MultipleIndexBatchIndexingResponse
instance'swait
call throwsAttributeError 'int' object has no attribute 'items'
. This is caused byget_items
trying to iterate overself.raw_response["taskID"]
which for some reason is an int.Steps To Reproduce
I honestly don't know how to trigger this behavior. Apparently the API allows mixed types in the
taskID
field (int
orobject
) which causes this behavior - how to trigger the API to respond with anint
there is unknown to me.Thanks