Skip to content

Commit

Permalink
use MongoError instead of plain Error
Browse files Browse the repository at this point in the history
  • Loading branch information
HanaPearlman committed Oct 15, 2020
1 parent 4c113dd commit 09dde51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operations/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function connect(

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

let didRequestAuthentication = false;
Expand Down

0 comments on commit 09dde51

Please sign in to comment.