File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1348,18 +1348,22 @@ export default class Collection extends ShellApiWithMongoClass {
1348
1348
1349
1349
// @ts -expect-error waiting for driver release
1350
1350
if ( ! encryptedFields && ! options . encryptedFields ) {
1351
- const collectionInfos = await this . _mongo . _serviceProvider . listCollections (
1352
- this . _database . _name ,
1353
- {
1354
- name : this . _name
1355
- } ,
1356
- await this . _database . _baseOptions ( )
1357
- ) ;
1351
+ try {
1352
+ const collectionInfos = await this . _mongo . _serviceProvider . listCollections (
1353
+ this . _database . _name ,
1354
+ {
1355
+ name : this . _name
1356
+ } ,
1357
+ await this . _database . _baseOptions ( )
1358
+ ) ;
1358
1359
1359
- const encryptedFields : Document | undefined = collectionInfos ?. [ 0 ] ?. options ?. encryptedFields ;
1360
+ const encryptedFields : Document | undefined = collectionInfos ?. [ 0 ] ?. options ?. encryptedFields ;
1360
1361
1361
- if ( encryptedFields ) {
1362
- encryptedFieldsOptions = { encryptedFields } ;
1362
+ if ( encryptedFields ) {
1363
+ encryptedFieldsOptions = { encryptedFields } ;
1364
+ }
1365
+ } catch ( error ) {
1366
+ // pass, ignore all error messages
1363
1367
}
1364
1368
}
1365
1369
You can’t perform that action at this time.
0 commit comments