feat: add connector status handling at boot with evses configuration
[e-mobility-charging-stations-simulator.git] / src / exception / OCPPError.ts
index 8ccc4fbf937000220be6cd026c8dec6f7cd9431d..c5d25ddc23d402070437d511dce6a3ea11156bc3 100644 (file)
@@ -1,12 +1,13 @@
 // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
 
-import { BaseError } from './BaseError';
+import { BaseError } from './internal';
 import {
   ErrorType,
   type IncomingRequestCommand,
   type JsonType,
   type RequestCommand,
 } from '../types';
+import { Constants } from '../utils';
 
 export class OCPPError extends BaseError {
   code: ErrorType;
@@ -23,6 +24,6 @@ export class OCPPError extends BaseError {
 
     this.code = code ?? ErrorType.GENERIC_ERROR;
     this.command = command;
-    this.details = details ?? {};
+    this.details = details ?? Constants.EMPTY_FREEZED_OBJECT;
   }
 }