Skip to content

Commit 8ee6e44

Browse files
committed
catch error during auto-add indexes on startup
1 parent d8053b9 commit 8ee6e44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Adapters/Storage/Mongo/MongoStorageAdapter.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,11 @@ export class MongoStorageAdapter {
559559
.then(schemaCollection => schemaCollection.updateSchema(schema.className, {
560560
$set: { _metadata: { indexes: indexes } }
561561
}));
562+
}).catch((err) => {
563+
/* eslint-disable no-console */
564+
console.info("\n>>>>>>> Caught an index error for " + schema.className + "\n");
565+
console.dir(err);
566+
/* eslint-enable no-console */
562567
});
563568
});
564569
return Promise.all(promises);

0 commit comments

Comments
 (0)