X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fexception%2FOCPPError.ts;h=5736ad277a1b981907c052eadc9c06aba04b342a;hb=6a4032b5d8f3cbaa18d3beddcdfe9d335c1cba90;hp=0c69eb23e31e957cbb2c5458a216867b49f5f9be;hpb=5edd8ba0f8978cfb3ca9d80f299d9748c6c5970e;p=e-mobility-charging-stations-simulator.git diff --git a/src/exception/OCPPError.ts b/src/exception/OCPPError.ts index 0c69eb23..5736ad27 100644 --- a/src/exception/OCPPError.ts +++ b/src/exception/OCPPError.ts @@ -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; } }