Skip to content

Commit c7032c0

Browse files
committed
docs: add comment about $err
1 parent c5617dd commit c7032c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmap/wire_protocol/responses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export class MongoDBResponse extends OnDemandDocument {
1515
/** Indicates this document is a server error */
1616
public get isError() {
1717
let isError = this.ok === 0;
18-
isError ||= this.has('$err');
1918
isError ||= this.has('errmsg');
2019
isError ||= this.has('code');
20+
isError ||= this.has('$err'); // The '$err' field is used in OP_REPLY responses
2121
return isError;
2222
}
2323

0 commit comments

Comments
 (0)