Skip to content

Commit 09dde51

Browse files
committed
use MongoError instead of plain Error
1 parent 4c113dd commit 09dde51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/operations/connect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export function connect(
199199

200200
// Has a connection already been established?
201201
if (mongoClient.topology && mongoClient.topology.isConnected()) {
202-
throw new Error(`'connect' cannot be called when already connected`);
202+
throw new MongoError(`'connect' cannot be called when already connected`);
203203
}
204204

205205
let didRequestAuthentication = false;

0 commit comments

Comments
 (0)