build(deps): apply updates
[e-mobility-charging-stations-simulator.git] / src / exception / OCPPError.ts
index 0c69eb23e31e957cbb2c5458a216867b49f5f9be..5736ad277a1b981907c052eadc9c06aba04b342a 100644 (file)
@@ -22,8 +22,9 @@ export class OCPPError extends BaseError {
   ) {
     super(message);
 
-    this.code = code ?? ErrorType.GENERIC_ERROR;
-    this.command = command;
-    this.details = details ?? Constants.EMPTY_FREEZED_OBJECT;
+    this.code = code;
+    this.command =
+      command ?? (Constants.UNKNOWN_COMMAND as RequestCommand | IncomingRequestCommand);
+    this.details = details;
   }
 }