We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49ab93b commit 3fbc334Copy full SHA for 3fbc334
src/MongoDB.Driver.Core/Core/Operations/RetryabilityHelper.cs
@@ -83,16 +83,19 @@ public static bool IsResumableChangeStreamException(Exception exception)
83
84
public static bool IsRetryableWriteException(Exception exception)
85
{
86
+ if (__retryableWriteExceptions.Contains(exception.GetType()))
87
+ {
88
+ return true;
89
+ }
90
+
91
var commandException = exception as MongoCommandException;
92
if (commandException != null)
93
94
var code = (ServerErrorCode)commandException.Code;
95
return __retryableWriteErrorCodes.Contains(code);
96
}
- else
- {
- return __retryableWriteExceptions.Contains(exception.GetType());
- }
97
98
+ return false;
99
100
101
0 commit comments