Rename a constant.
[e-mobility-charging-stations-simulator.git] / src / charging-station / OcppError.ts
index ea34d943f741a7253bea31a1302259e8b0694f0c..d39cdef1c8f5baa039c7941d51cfb724ce8569df 100644 (file)
@@ -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;
 
-  constructor(code: string, message: string, details?) {
+  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 || {};