Skip to content

Commit eed35ba

Browse files
committed
chore: Roll back to MongoDriverError since this is not an APIError
1 parent 3218862 commit eed35ba

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/sdam/topology_description.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as WIRE_CONSTANTS from '../cmap/wire_protocol/constants';
33
import { TopologyType, ServerType } from './common';
44
import type { ObjectId, Document } from '../bson';
55
import type { SrvPollingEvent } from './srv_polling';
6-
import { MongoError, MongoCompatibilityError } from '../error';
6+
import { MongoError, MongoDriverError } from '../error';
77

88
// constants related to compatibility checks
99
const MIN_SUPPORTED_SERVER_VERSION = WIRE_CONSTANTS.MIN_SUPPORTED_SERVER_VERSION;
@@ -431,9 +431,8 @@ function updateRsWithPrimaryFromMember(
431431
setName?: string
432432
): TopologyType {
433433
if (setName == null) {
434-
throw new MongoCompatibilityError(
435-
'Argument "setName" is required if connected to a replica set'
436-
);
434+
// TODO(NODE-3483): should be an appropriate runtime error
435+
throw new MongoDriverError('Argument "setName" is required if connected to a replica set');
437436
}
438437

439438
if (

0 commit comments

Comments
 (0)