Skip to content

Commit 238350c

Browse files
committed
fix(MongoMemory*::start): change error warning to include the error
1 parent 7710885 commit 238350c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/mongodb-memory-server-core/src/MongoMemoryReplSet.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,10 @@ export class MongoMemoryReplSet extends EventEmitter implements ManagerAdvanced
356356
.then(() => this._initReplSet())
357357
.catch(async (err) => {
358358
if (!debug.enabled('MongoMS:MongoMemoryReplSet')) {
359-
console.warn('Starting the ReplSet failed, enable debug for more information');
359+
console.warn(
360+
'Starting the MongoMemoryReplSet Instance failed, enable debug log for more information. Error:\n',
361+
err
362+
);
360363
}
361364

362365
await this.stop(false); // still try to close the instance that was spawned, without cleanup for investigation

packages/mongodb-memory-server-core/src/MongoMemoryServer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ export class MongoMemoryServer extends EventEmitter implements ManagerAdvanced {
279279

280280
await this._startUpInstance(forceSamePort).catch(async (err) => {
281281
if (!debug.enabled('MongoMS:MongoMemoryServer')) {
282-
console.warn('Starting the instance failed, enable debug for more information');
282+
console.warn(
283+
'Starting the MongoMemoryServer Instance failed, enable debug log for more information. Error:\n',
284+
err
285+
);
283286
}
284287

285288
await this.stop(false); // still try to close the instance that was spawned, without cleanup for investigation

0 commit comments

Comments
 (0)