Skip to content

Commit adcc11d

Browse files
committed
testing
1 parent 0c4350e commit adcc11d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pymongo/asynchronous/mongo_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,15 +2592,21 @@ async def run(self) -> T:
25922592
isinstance(exc, OperationFailure)
25932593
and exc_code not in helpers_shared._RETRYABLE_ERROR_CODES
25942594
):
2595+
if self._operation in (_Op.LIST_COLLECTIONS, _Op.INSERT):
2596+
print(f"Raising error for {self._operation}")
25952597
raise
25962598
self._retrying = True
25972599
self._last_error = exc
25982600
else:
2601+
if self._operation in (_Op.LIST_COLLECTIONS, _Op.INSERT):
2602+
print(f"Raising error for {self._operation}")
25992603
raise
26002604

26012605
# Specialized catch on write operation
26022606
if not self._is_read:
26032607
if not self._retryable:
2608+
if self._operation in (_Op.LIST_COLLECTIONS, _Op.INSERT):
2609+
print(f"Raising error for {self._operation}")
26042610
raise
26052611
if isinstance(exc, ClientBulkWriteException) and exc.error:
26062612
retryable_write_error_exc = isinstance(
@@ -2615,6 +2621,8 @@ async def run(self) -> T:
26152621
if exc.has_error_label("NoWritesPerformed") and self._last_error:
26162622
raise self._last_error from exc
26172623
else:
2624+
if self._operation in (_Op.LIST_COLLECTIONS, _Op.INSERT):
2625+
print(f"Raising error for {self._operation}")
26182626
raise
26192627
if self._bulk:
26202628
self._bulk.retrying = True

0 commit comments

Comments
 (0)