refactor: cleanup default params in error handlers
[e-mobility-charging-stations-simulator.git] / src / performance / storage / Storage.ts
index ccdbb3f835411c27521e1c17df33002d7cfd259a..39d0a1b30250b80fd825351f4d476792ef89a3a6 100644 (file)
@@ -9,7 +9,7 @@ import {
   type Statistics,
   StorageType
 } from '../../types/index.js'
-import { logger, setDefaultErrorParams } from '../../utils/index.js'
+import { logger } from '../../utils/index.js'
 
 export abstract class Storage {
   protected readonly storageUri: URL
@@ -31,7 +31,13 @@ export abstract class Storage {
       consoleOut: false
     }
   ): void {
-    params = setDefaultErrorParams(params, { throwError: false, consoleOut: false })
+    params = {
+      ...{
+        throwError: false,
+        consoleOut: false
+      },
+      ...params
+    }
     const inTableOrCollectionStr = table != null && ` in table or collection '${table}'`
     logger.error(
       `${this.logPrefix} ${this.getDBNameFromStorageType(type)} error '${