Skip to content

Commit 1eaf74e

Browse files
rename writeconcernfailed
1 parent 9574aaa commit 1eaf74e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/bulk/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export class BulkWriteResult {
285285
if (i === 0) errmsg = errmsg + ' and ';
286286
}
287287

288-
return new WriteConcernError({ errmsg, code: MONGODB_ERROR_CODES.WriteConcernFailed });
288+
return new WriteConcernError({ errmsg, code: MONGODB_ERROR_CODES.WriteConcernTimeout });
289289
}
290290
}
291291

src/error.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export const MONGODB_ERROR_CODES = Object.freeze({
5656
FailedToSatisfyReadPreference: 133,
5757
CursorNotFound: 43,
5858
LegacyNotPrimary: 10058,
59-
WriteConcernFailed: 64,
59+
// WriteConcernTimeout is WriteConcernFailed on pre-8.1 servers
60+
WriteConcernTimeout: 64,
6061
NamespaceNotFound: 26,
6162
IllegalOperation: 20,
6263
MaxTimeMSExpired: 50,

0 commit comments

Comments
 (0)