Skip to content

Commit 296036d

Browse files
committed
Keep MongoError for debugging
1 parent e486fd0 commit 296036d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operations/rename.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineAspects, Aspect } from './operation';
44
import type { Server } from '../sdam/server';
55
import { Collection } from '../collection';
66
import type { CommandOperationOptions } from './command';
7-
import { MongoDriverError, MongoServerError } from '../error';
7+
import { MongoError, MongoServerError } from '../error';
88
import type { ClientSession } from '../sessions';
99
import type { Document } from 'bson';
1010

@@ -52,7 +52,7 @@ export class RenameOperation extends RunAdminCommandOperation {
5252
try {
5353
newColl = new Collection(coll.s.db, this.newName, coll.s.options);
5454
} catch (err) {
55-
return callback(new MongoDriverError(err));
55+
return callback(new MongoError(err));
5656
}
5757

5858
return callback(undefined, newColl);

0 commit comments

Comments
 (0)