We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9574aaa commit 1eaf74eCopy full SHA for 1eaf74e
2 files changed
src/bulk/common.ts
@@ -285,7 +285,7 @@ export class BulkWriteResult {
285
if (i === 0) errmsg = errmsg + ' and ';
286
}
287
288
- return new WriteConcernError({ errmsg, code: MONGODB_ERROR_CODES.WriteConcernFailed });
+ return new WriteConcernError({ errmsg, code: MONGODB_ERROR_CODES.WriteConcernTimeout });
289
290
291
src/error.ts
@@ -56,7 +56,8 @@ export const MONGODB_ERROR_CODES = Object.freeze({
56
FailedToSatisfyReadPreference: 133,
57
CursorNotFound: 43,
58
LegacyNotPrimary: 10058,
59
- WriteConcernFailed: 64,
+ // WriteConcernTimeout is WriteConcernFailed on pre-8.1 servers
60
+ WriteConcernTimeout: 64,
61
NamespaceNotFound: 26,
62
IllegalOperation: 20,
63
MaxTimeMSExpired: 50,
0 commit comments