X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FOcppError.ts;h=ae86c0a160138657b193aa413258349874570ca5;hb=3ba49ba9f96d06c09f19009dcbe9360eb172782a;hp=d11ad56f0b632d0ef826d8d8e9adad464057e5e8;hpb=662b42702f5ec560290042715dcbde3b1a948587;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/OcppError.ts b/src/charging-station/OcppError.ts index d11ad56f..ae86c0a1 100644 --- a/src/charging-station/OcppError.ts +++ b/src/charging-station/OcppError.ts @@ -1,13 +1,13 @@ -import Constants from '../utils/Constants'; +import { ErrorType } from '../types/ocpp/ErrorType'; export default class OCPPError extends Error { code: string; - details: any; + details?: any; constructor(code: string, message: string, details?: any) { super(message); - this.code = code || Constants.OCPP_ERROR_GENERIC_ERROR; + this.code = code || ErrorType.GENERIC_ERROR; this.message = message || ''; this.details = details || {};