Skip to content

Commit ee646d7

Browse files
fix flaky id in polling (Azure#19921)
1 parent f0f09cf commit ee646d7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_polling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _current_body(self):
9494

9595
def _get_id_from_headers(self):
9696
# type: () -> str
97-
return self._pipeline_response.http_response.headers[
97+
return self._initial_response.http_response.headers[
9898
"Operation-Location"
9999
].split("/batches/")[1]
100100

sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_async_polling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _current_body(self) -> _TranslationStatus:
7676
return _TranslationStatus.deserialize(self._pipeline_response)
7777

7878
def _get_id_from_headers(self) -> str:
79-
return self._pipeline_response.http_response.headers[
79+
return self._initial_response.http_response.headers[
8080
"Operation-Location"
8181
].split("/batches/")[1]
8282

0 commit comments

Comments
 (0)