X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fexception%2FOCPPError.ts;h=5736ad277a1b981907c052eadc9c06aba04b342a;hb=7375968c99fc22707e16e5e7923ca130c824ce5b;hp=f624d7e79704026eb60925f88ba3ddd0ae56de97;hpb=3133b91cd6761645ddeabac18e6db8d34a10356e;p=e-mobility-charging-stations-simulator.git diff --git a/src/exception/OCPPError.ts b/src/exception/OCPPError.ts index f624d7e7..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_FROZEN_OBJECT; + this.code = code; + this.command = + command ?? (Constants.UNKNOWN_COMMAND as RequestCommand | IncomingRequestCommand); + this.details = details; } }