File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2579,6 +2579,8 @@ async def run(self) -> T:
2579
2579
# A ServerSelectionTimeoutError error indicates that there may
2580
2580
# be a persistent outage. Attempting to retry in this case will
2581
2581
# most likely be a waste of time.
2582
+ if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
2583
+ print (f"Raising timeout error for { self ._operation } " )
2582
2584
raise
2583
2585
except PyMongoError as exc :
2584
2586
if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
@@ -2619,6 +2621,8 @@ async def run(self) -> T:
2619
2621
await self ._session ._unpin ()
2620
2622
if not retryable_write_error_exc or self ._is_not_eligible_for_retry ():
2621
2623
if exc .has_error_label ("NoWritesPerformed" ) and self ._last_error :
2624
+ if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
2625
+ print (f"Raising error for { self ._operation } " )
2622
2626
raise self ._last_error from exc
2623
2627
else :
2624
2628
if self ._operation in (_Op .LIST_COLLECTIONS , _Op .INSERT ):
You can’t perform that action at this time.
0 commit comments