Skip to content

Commit 0d3c02e

Browse files
fix(NODE-4647): improve error message (#3409)
Co-authored-by: Bailey Pearson <[email protected]>
1 parent 7c8ff33 commit 0d3c02e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/operations/delete.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export class DeleteOperation extends CommandOperation<Document> {
8585
const unacknowledgedWrite = this.writeConcern && this.writeConcern.w === 0;
8686
if (unacknowledgedWrite) {
8787
if (this.statements.find((o: Document) => o.hint)) {
88-
callback(new MongoCompatibilityError(`Servers < 3.4 do not support hint on delete`));
88+
// TODO(NODE-3541): fix error for hint with unacknowledged writes
89+
callback(new MongoCompatibilityError(`hint is not supported with unacknowledged writes`));
8990
return;
9091
}
9192
}

src/operations/update.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ export class UpdateOperation extends CommandOperation<Document> {
110110
const unacknowledgedWrite = this.writeConcern && this.writeConcern.w === 0;
111111
if (unacknowledgedWrite) {
112112
if (this.statements.find((o: Document) => o.hint)) {
113-
callback(new MongoCompatibilityError(`Servers < 3.4 do not support hint on update`));
113+
// TODO(NODE-3541): fix error for hint with unacknowledged writes
114+
callback(new MongoCompatibilityError(`hint is not supported with unacknowledged writes`));
114115
return;
115116
}
116117
}

0 commit comments

Comments
 (0)