From f4c74b129ac6d0a70fe295ec89d7f93db97498e9 Mon Sep 17 00:00:00 2001 From: Mathis Date: Fri, 24 May 2024 11:23:03 +0200 Subject: [PATCH] refactor: standardize error message in mariadb.service.ts Updated logging messages in MariaDB service file. Removed template literals in logging and replaced them with standard strings for consistency and readability. Made adjustments in connection error messages and query execution error messages. --- src/services/databases/mariadb.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/databases/mariadb.service.ts b/src/services/databases/mariadb.service.ts index 3a9eae9..77c5fe5 100644 --- a/src/services/databases/mariadb.service.ts +++ b/src/services/databases/mariadb.service.ts @@ -26,7 +26,7 @@ export class MariadbService { }); this.Connection.connect((err) => { if (err) { - this.logs.error(`Error connecting to MySQL:`, err); + this.logs.error("Error connecting to MySQL:", err); } this.logs.debug("Connected to MariaDB", this.envs.get("MYSQL_DATABASE")); }); @@ -39,7 +39,7 @@ export class MariadbService { return new Promise((resolve, reject) => { this.Connection.query(queryString, (err, results) => { if (err) { - this.logs.error(`Error executing query:`, err); + this.logs.error("Error executing query:", err); reject(err); } else { resolve(results); @@ -76,7 +76,7 @@ export class MariadbService { `Action: ${data.actionName}`, ); if (_id.length > 0) { - this.logs.trace(`Id post-pushed in factorized data.`, _id); + this.logs.trace("Id post-pushed in factorized data.", _id); values.push(_id); _sqlQueryKeys.push("id"); }