File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ export class BulkWriteResult {
285
285
if ( i === 0 ) errmsg = errmsg + ' and ' ;
286
286
}
287
287
288
- return new WriteConcernError ( { errmsg, code : MONGODB_ERROR_CODES . WriteConcernFailed } ) ;
288
+ return new WriteConcernError ( { errmsg, code : MONGODB_ERROR_CODES . WriteConcernTimeout } ) ;
289
289
}
290
290
}
291
291
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ export const MONGODB_ERROR_CODES = Object.freeze({
56
56
FailedToSatisfyReadPreference : 133 ,
57
57
CursorNotFound : 43 ,
58
58
LegacyNotPrimary : 10058 ,
59
- WriteConcernFailed : 64 ,
59
+ // WriteConcernTimeout is WriteConcernFailed on pre-8.1 servers
60
+ WriteConcernTimeout : 64 ,
60
61
NamespaceNotFound : 26 ,
61
62
IllegalOperation : 20 ,
62
63
MaxTimeMSExpired : 50 ,
You can’t perform that action at this time.
0 commit comments