@@ -5,7 +5,7 @@ import { OP_QUERY, OP_GETMORE, OP_KILL_CURSORS, OP_MSG } from './wire_protocol/c
5
5
import type { Long , Document , BSONSerializeOptions } from '../bson' ;
6
6
import type { ClientSession } from '../sessions' ;
7
7
import type { CommandOptions } from './connection' ;
8
- import { MongoDriverError , MongoInvalidArgumentError } from '../error' ;
8
+ import { MongoRuntimeError , MongoInvalidArgumentError } from '../error' ;
9
9
10
10
// Incrementing request id
11
11
let _requestId = 0 ;
@@ -78,14 +78,14 @@ export class Query {
78
78
constructor ( ns : string , query : Document , options : OpQueryOptions ) {
79
79
// Basic options needed to be passed in
80
80
// TODO(NODE-3483): Replace with MongoCommandError
81
- if ( ns == null ) throw new MongoDriverError ( 'Namespace must be specified for query' ) ;
81
+ if ( ns == null ) throw new MongoRuntimeError ( 'Namespace must be specified for query' ) ;
82
82
// TODO(NODE-3483): Replace with MongoCommandError
83
- if ( query == null ) throw new MongoDriverError ( 'A query document must be specified for query' ) ;
83
+ if ( query == null ) throw new MongoRuntimeError ( 'A query document must be specified for query' ) ;
84
84
85
85
// Validate that we are not passing 0x00 in the collection name
86
86
if ( ns . indexOf ( '\x00' ) !== - 1 ) {
87
87
// TODO(NODE-3483): Use MongoNamespace static method
88
- throw new MongoDriverError ( 'Namespace cannot contain a null character' ) ;
88
+ throw new MongoRuntimeError ( 'Namespace cannot contain a null character' ) ;
89
89
}
90
90
91
91
// Basic options
@@ -858,7 +858,7 @@ export class BinMsg {
858
858
// It was decided that no driver makes use of payload type 1
859
859
860
860
// TODO(NODE-3483): Replace with MongoDeprecationError
861
- throw new MongoDriverError ( 'OP_MSG Payload Type 1 detected unsupported protocol' ) ;
861
+ throw new MongoRuntimeError ( 'OP_MSG Payload Type 1 detected unsupported protocol' ) ;
862
862
}
863
863
}
864
864
0 commit comments