File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2592,15 +2592,21 @@ async def run(self) -> T:
2592
2592
isinstance (exc , OperationFailure )
2593
2593
and exc_code not in helpers_shared ._RETRYABLE_ERROR_CODES
2594
2594
):
2595
+ if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
2596
+ print (f"Raising error for { self ._operation } " )
2595
2597
raise
2596
2598
self ._retrying = True
2597
2599
self ._last_error = exc
2598
2600
else :
2601
+ if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
2602
+ print (f"Raising error for { self ._operation } " )
2599
2603
raise
2600
2604
2601
2605
# Specialized catch on write operation
2602
2606
if not self ._is_read :
2603
2607
if not self ._retryable :
2608
+ if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
2609
+ print (f"Raising error for { self ._operation } " )
2604
2610
raise
2605
2611
if isinstance (exc , ClientBulkWriteException ) and exc .error :
2606
2612
retryable_write_error_exc = isinstance (
@@ -2615,6 +2621,8 @@ async def run(self) -> T:
2615
2621
if exc .has_error_label ("NoWritesPerformed" ) and self ._last_error :
2616
2622
raise self ._last_error from exc
2617
2623
else :
2624
+ if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
2625
+ print (f"Raising error for { self ._operation } " )
2618
2626
raise
2619
2627
if self ._bulk :
2620
2628
self ._bulk .retrying = True
You can’t perform that action at this time.
0 commit comments