X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fexception%2FOCPPError.ts;h=0c69eb23e31e957cbb2c5458a216867b49f5f9be;hb=0d1f33bab47bbcd712ea6ae7e26293917c8bc398;hp=8ccc4fbf937000220be6cd026c8dec6f7cd9431d;hpb=268a74bb051fcbbad532fd833f0d8fd2b33b6c64;p=e-mobility-charging-stations-simulator.git diff --git a/src/exception/OCPPError.ts b/src/exception/OCPPError.ts index 8ccc4fbf..0c69eb23 100644 --- a/src/exception/OCPPError.ts +++ b/src/exception/OCPPError.ts @@ -7,6 +7,7 @@ import { type JsonType, type RequestCommand, } from '../types'; +import { Constants } from '../utils'; export class OCPPError extends BaseError { code: ErrorType; @@ -17,12 +18,12 @@ export class OCPPError extends BaseError { code: ErrorType, message: string, command?: RequestCommand | IncomingRequestCommand, - details?: JsonType + details?: JsonType, ) { super(message); this.code = code ?? ErrorType.GENERIC_ERROR; this.command = command; - this.details = details ?? {}; + this.details = details ?? Constants.EMPTY_FREEZED_OBJECT; } }