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:
Mathis H (Avnyr) 2024-05-24 11:37:34 +02:00
parent f4c74b129a
commit a0b9b10bb4
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -19,7 +19,7 @@ export class MongodbService {
this.logs.debug("Connected to MongoDB", "All databases");
});
} catch (error) {
this.logs.error(`Error connecting to MongoDB:`, error);
this.logs.error("Error connecting to MongoDB:", error);
throw new Error();
}
}