Skip to content

Commit 14e401b

Browse files
committed
fix client bulk write handling
1 parent a653b2d commit 14e401b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/asynchronous/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,7 @@ async def run(self) -> T:
28232823
retryable_write_label = exc_to_check.has_error_label("RetryableWriteError")
28242824
always_retryable = exc_to_check.has_error_label(
28252825
"RetryableError"
2826-
) and exc.has_error_label("SystemOverloadedError")
2826+
) and exc_to_check.has_error_label("SystemOverloadedError")
28272827
overloaded = exc_to_check.has_error_label("SystemOverloadedError")
28282828
if not self._retryable and not always_retryable:
28292829
raise

pymongo/synchronous/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2813,7 +2813,7 @@ def run(self) -> T:
28132813
retryable_write_label = exc_to_check.has_error_label("RetryableWriteError")
28142814
always_retryable = exc_to_check.has_error_label(
28152815
"RetryableError"
2816-
) and exc.has_error_label("SystemOverloadedError")
2816+
) and exc_to_check.has_error_label("SystemOverloadedError")
28172817
overloaded = exc_to_check.has_error_label("SystemOverloadedError")
28182818
if not self._retryable and not always_retryable:
28192819
raise

0 commit comments

Comments
 (0)