refactor: use static string for MongoDB connection error log
The error message displayed when the MongoDB connection fails has been changed to use a static string. This is a small refactoring change that can result in more predictable log messages and easier debugging.
This commit is contained in:
parent
f4c74b129a
commit
a0b9b10bb4
@ -19,7 +19,7 @@ export class MongodbService {
|
|||||||
this.logs.debug("Connected to MongoDB", "All databases");
|
this.logs.debug("Connected to MongoDB", "All databases");
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logs.error(`Error connecting to MongoDB:`, error);
|
this.logs.error("Error connecting to MongoDB:", error);
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user