docs: refine README
[e-mobility-charging-stations-simulator.git] / src / exception / OCPPError.ts
index 8ccc4fbf937000220be6cd026c8dec6f7cd9431d..35df1f5083643929e5c35bc309ed33be82335d93 100644 (file)
@@ -7,6 +7,7 @@ import {
   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;
   }
 }